I want my server to authenticate all outgoing emails from my server. At the domain provider, I record the SPF record and the authentication works perfectly. However, I also want my server to authenticate outbound mail from even a gmail email address. I sent the mail with PHPMailer and gave it a try, but when I read the mail, gmail prompts me that the email may not have been sent by the sender. The email header is not encrypted. For other email providers, I see that their own server authenticates even if they use gmail email addresses. What do I need to do to have my server authenticate outgoing mail from my server (including using a gmail email address). I want to build a newsletter sending service. Of course, I do not want to commit fraud and unethical activities. Customers can only use specific email addresses after they have previously activated it. So the email will only be used by the rightful owner of the email address. I just don’t know how to get my server to authenticate when sending these emails
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!
Hi there,
One way to do this would be to setup a MTA agent like Postfix as described in this tutorial here:
But before doing so, I would mention two things:
https://www.digitalocean.com/community/tutorials/why-you-may-not-want-to-run-your-own-mail-server
An alternative option would be to use a managed SMTP service like SendGrid for example. They have a free plan that is sufficient for a lot of the use cases.
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.