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

Posted February 24, 2019 2k views
EmailUbuntu 16.04

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

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.

Submit an Answer
1 answer

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: