Report this

What is the reason for this report?

Setting up Mailgun in a DO server which is running as a sub domain

Posted on February 24, 2019

Hi there I have a website with its main domain hosted with another provider. We are developing the web application which is to be hosted in a DO server. This DO server will be running under a sub domain. WE want to send email from this server using mail gun How this can be accomplished?

Thank you



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey friend,

The answer to this will be very relative. Mailgun is going to give you connection information. You can either develop your application to use that connection information from scratch, or you can look for existing libraries that assist with SMTP authentication for the language you have chosen to code in. Most likely some type of library already exists. Here is an example of one for Python:

https://docs.python.org/3/library/smtplib.html

Jarland

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.