NetTalk Central

Author Topic: Send mail with gmail smtp  (Read 39570 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Send mail with gmail smtp
« 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]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Send mail with gmail smtp
« Reply #1 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

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Send mail with gmail smtp
« Reply #2 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?
-----------
Regards
Alberto

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Send mail with gmail smtp
« Reply #3 on: February 05, 2014, 02:40:31 PM »
Try with port 587 with SSL

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Send mail with gmail smtp
« Reply #4 on: February 06, 2014, 07:00:08 AM »
ok port 587
but how do I use SSL ? what do I need to change?
-----------
Regards
Alberto

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Send mail with gmail smtp
« Reply #5 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

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Send mail with gmail smtp
« Reply #6 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]
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Send mail with gmail smtp
« Reply #7 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

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
Re: Send mail with gmail smtp
« Reply #8 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
 

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Send mail with gmail smtp
« Reply #9 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?
-----------
Regards
Alberto

debzidoodle

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
    • Email
Re: Send mail with gmail smtp
« Reply #10 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.

Flint G

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Email
Re: Send mail with gmail smtp
« Reply #11 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
NetTalk: 12.26
Clarion: 9.1.11529
Brave: 1.31.88
Chrome: 95.0.4638.69
Edge: 95.0.1020.44
ExtJS: 7.0.0.156

Flint G

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Email
Re: Send mail with gmail smtp
« Reply #12 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
NetTalk: 12.26
Clarion: 9.1.11529
Brave: 1.31.88
Chrome: 95.0.4638.69
Edge: 95.0.1020.44
ExtJS: 7.0.0.156