My hosting failed to send email from gmail

October 9, 2017 106 views
Email DigitalOcean Ubuntu

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
              }
        });
Be the first one to answer this question.