DEV Community

Lumin
Lumin

Posted on

1 1

บันทึกการ verify mailgun domain ด้วย domain.google

ที่มาที่ไป

  • ทำ campaign website ให้ลูกค้า
  • ทั้งเราและลูกค้าไม่มี server
  • mailgun ส่งแบบ pay as you go - ใช้เท่าไหร่จ่ายเท่านั้น
  • เราซื้อ domain.google ไว้ตัวนึง

ทำไมเลือก mailgun

ข้อดี

  • ใน environment dev เราสามารถส่งได้ฟรี ไม่ต้องมี billing แต่จำกัดการส่งเฉพาะ email ที่ทำ verify ใน mailgun accoun ของเราเท่านั้น
  • สามารถสร้างได้หลาย domain เอาไปใช้ได้กับลูกค้าหลายๆเจ้า
  • ใช้ API key เดียวกันหมดทุก domain

ข้อเสีย

  • ตอนขึ้น production จริงๆ ต้องทำ verify domain จริง
  • ไม่มี limit usage ของแต่ละ domain

อื่นๆ

  • ไม่มีเวลาดูเจ้าอื่น รู้จักและใช้ mailgun มาก่อนหน้านี้

ทำอย่างไร

  1. เพิ่ม domain ใหม่ใน mailgun
  2. เอา DNS record ของ mailgun ไปใส่ใน domain
  3. เข้า domain.google ตรงบนสุดกด "My Domains"
  4. เราจะเห็นรายการ domain กดเลือก "Manage"
  5. ด้านซ้ายมือ เลือก "DNS"
  6. เพิ่ม subdomain ใน Synthetic records โดยเลือก เป็น dynamic DNS
  7. เพิ่ม Custom resource records
  8. type = TXT, target = subdomain, text = "ตาม mailgun"
  9. type = TXT, target = pic._domainkey.subdomain, text = "ตาม mailgun"
  10. type = MX, target = subdomain, text = "mxa.eu.mailgun.org" + "mxb.eu.mailgun.org"
  11. type = CNAME, target = email.subdomain, text = "eu.mailgun.org"

ขั้นตอนต่อไปคือการรอ ... ประมาณ 45 นาที
ถ้า DNS ยังทำงานไม่เสร็จหรือค่าที่เรากรอกไปมีปัญหา ใช้งานไม่ได้ mailgun จะให้ไปที่หน้า verify domain ตลอด และยังใช้ domain นี้ส่งเมล์ไม่ได้
ถ้า DNS ทำงานเสร็จเรียบร้อย จะเห็นหน้า dashboard แสดงจำนวนของ email ที่ส่ง และสามารถใช้ domain นี้ในการส่วเมล์ได้เลย

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (1)

Collapse
 
stankukucka profile image
Stan Kukučka

@ilumin may be interesting for you this Thai article

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more