NetTalk Central

NetTalk E-Mail => E-Mail - Ask For Help => Topic started by: Alberto on February 04, 2014, 03:26:21 PM

Title: Send mail with gmail smtp
Post by: Alberto on February 04, 2014, 03:26:21 PM
Hi,
I´m trying to use the gmail smtp to send mails and I get errors like the attached image.
I have inatalled all the secure dll´s indicated in the help.
Thanks

[attachment deleted by admin]
Title: Re: Send mail with gmail smtp
Post by: Bruce on February 04, 2014, 08:21:25 PM
you can add code to the .Process and .Send methods to "see" the conversation. That can help to determine what might be wrong.
The email you are sending though - does it have a large attachment?

cheers
Bruce
Title: Re: Send mail with gmail smtp
Post by: Alberto on February 05, 2014, 01:10:03 PM
Hi Bruce,
The mail has a simple line, no atachmets.
HOw can I see the conversation, which code must I use in Process and Send?
Title: Re: Send mail with gmail smtp
Post by: osquiabro on February 05, 2014, 02:40:31 PM
Try with port 587 with SSL
Title: Re: Send mail with gmail smtp
Post by: Alberto on February 06, 2014, 07:00:08 AM
ok port 587
but how do I use SSL ? what do I need to change?
Title: Re: Send mail with gmail smtp
Post by: osquiabro on February 06, 2014, 01:54:46 PM
i don't why but i configurate my SQL Server for send email with google relay and only work via SSL

Try with
ThisEmailSend.SSL = 1
Title: Re: Send mail with gmail smtp
Post by: Alberto on February 06, 2014, 06:38:20 PM
Ok I use the new port and ThisEmailSend.SSL = 1
Caroot.pem is in the app forlder but I allways get the same error, see image

SSL failed to load Ca root file.

What am I missing?

Thanks


[attachment deleted by admin]
Title: Re: Send mail with gmail smtp
Post by: Bruce on February 06, 2014, 10:24:46 PM
in your email procedure what is the name of the CA Root certificate set to?
caroot.pem or ca_root.pem, or something else?
the name of the file on the disk must match the name in this setting.

cheers
Bruce
Title: Re: Send mail with gmail smtp
Post by: debzidoodle on February 07, 2014, 05:50:59 AM
I send through gmail all the time, and I use the following settings
Code: [Select]
     
ThisEmailSend.Server = 'smtp.gmail.com'
ThisEmailSend.Port =587
ThisEmailSend.SSL = 1
ThisEmailSend.SecureEmailStartTLS = 1
If ThisEmailSend.SSL or ThisEmailSend.SecureEmailStartTLS
  ThisEmailSend.SSLCertificateOptions.CertificateFile = ''
  ThisEmailSend.SSLCertificateOptions.PrivateKeyFile = ''
  ThisEmailSend.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 0
  ThisEmailSend.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 0
  ThisEmailSend.SSLCertificateOptions.CARootFile = '.\certs\CA Roots\CA_Roots.pem'
end
If ThisEmailSend.SecureEmailStartTLS
  ThisEmailSend.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
end
 
Title: Re: Send mail with gmail smtp
Post by: Alberto on February 07, 2014, 07:10:09 AM
Thanks debzidoodle !
But using your code the email is sent but it does not arrive at any account.
I´ve tried sending to a hotmail and a gmail account but nothing, no errors, no nothing.
Any idea?
Title: Re: Send mail with gmail smtp
Post by: debzidoodle on February 07, 2014, 08:03:40 AM
Using the sending account from gmail, do you see it in the sent items?  If so I would say its getting blocked or sent to junk mail somewhere along the way.  If its not in sent items then it did not get sent and you have something else wrong.  Make sure in your Error Trap embed that you check ThisEmailSend.ServerErrorDesc for any errors.  Google is pretty good about giving descriptions if you are doing something wrong.
Title: Re: Send mail with gmail smtp
Post by: Flint G on February 09, 2016, 08:12:48 AM
Michelis,

Try sending to another Gmail account, first.  That will tell you if you're successfully getting into the Gmail SMTP server, or not.  If you receive the mail at your alternate Gmail account, then you've made it this far.  If not, you're still missing something in the connect/send bit on your side.

If your test is received at another Gmail account, but not at a Hotmail, Outlook or Yahoo account, then you might only be missing some security settings in the connect bit on your side.  This is the kind of troubleshooting I do with my clients who have the same problem.

Flint
Title: Re: Send mail with gmail smtp
Post by: Flint G on February 09, 2016, 08:13:38 AM
Only two years late ... hope you got it figured out already  :D

Michelis,

Try sending to another Gmail account, first.  That will tell you if you're successfully getting into the Gmail SMTP server, or not.  If you receive the mail at your alternate Gmail account, then you've made it this far.  If not, you're still missing something in the connect/send bit on your side.

If your test is received at another Gmail account, but not at a Hotmail, Outlook or Yahoo account, then you might only be missing some security settings in the connect bit on your side.  This is the kind of troubleshooting I do with my clients who have the same problem.

Flint