By longsookeat
I had contacted Digital Ocean about my gmail server. They said I must add the record on the domain side.
I had add SPF google and the domain IP is my server IP.
But I failed to send the gmail from my hosting server.
"v=spf1 ip4:128.199.69.30 include:_spf.google.com -all"
I’m using nodeJS to test email function:
var transporter = nodemailer.createTransport({
host: 'smtp.gmail.com',
port: 587,
secure: false, // secure:true for port 465, secure:false for port 587
auth: {
user: mConfig.sender_email, // Your email id
pass: mConfig.sender_password // Your password
}
});
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!
Hello,
The SPF record looks correct. Also you need to make sure that port 587 is open on your droplet for outgoing TCP connections. If you are using UFW you could do that with this command:
ufw allow out 587/tcp
If this is still not working, can you share the error that you are getting here?
Regards, 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.