NetTalk Central

NetTalk E-Mail => E-Mail - Ask For Help => Topic started by: bwhisler on November 30, 2011, 10:30:55 AM

Title: Nettalk 4 - Sending via Gmail
Post by: bwhisler on November 30, 2011, 10:30:55 AM
Ok, yes I know there is a newer version than Nettalk 4, but that is what I have to work with today<g>.

I'm trying to get email to send usiong GMAIL but have not been able to get it to work. I checked and found an article in Jan 2010 but that does not seem to work. Is there a more current example somewhere that shows what is needed to get GMAIL to work.

Thanks!

Barton Whisler
Prosoft Inc - Tampa Florida
Title: Re: Nettalk 4 - Sending via Gmail
Post by: Flint G on February 28, 2012, 10:11:46 AM
Barton,

Though I haven't worked with NT4 in a while, now, I can tell you what works for me:

Server: smtp.gmail.com
Username: Fully-qualified email address
Password: Obviously the password that goes with the Gmail account

I like to use TLS, but you can also use SSL.  For Gmail, SSL uses port 465, TLS uses port 587 (http://support.google.com/mail/bin/answer.py?hl=en&answer=78799 (http://support.google.com/mail/bin/answer.py?hl=en&answer=78799)).  You can also use port 25 without SSL or TLS, but Gmail limits you to sending email only to other Gmail accounts, and not to any other address.  So to be useful, anymore, you need to use SSL or TLS

To use TLS/SSL with NetTalk (retrieved from http://www.capesoft.com/docs/NetTalk6/NetTalk3.htm#NetEmailSend_Example_Code (http://www.capesoft.com/docs/NetTalk6/NetTalk3.htm#NetEmailSend_Example_Code)):

Code: [Select]
 ThisEmailSend.SSL = 0 ! Set to 1 to use SSL
  ThisEmailSend.SecureEmailStartTLS = 0 ! Set to 1 to use StartTLS
  if ThisEmailSend.SSL or ThisEmailSend.SecureEmailStartTLS
    ThisEmailSend.SSLCertificateOptions.CertificateFile = ''
    ThisEmailSend.SSLCertificateOptions.PrivateKeyFile = ''
    ThisEmailSend.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 0
    ThisEmailSend.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 0
    ThisEmailSend.SSLCertificateOptions.CARootFile = '.\ca_root.pem'
  end
  if ThisEmailSend.SecureEmailStartTLS
    ThisEmailSend.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
    ! Fudge this for now, as the certificate is not known
    ! when NetSimple does the CommonName check
  end

If you don't have a caroot.pem file, snag one from the examples.

Does this help?

Regards,
Flint