NetTalk Central

Author Topic: Nettalk 4 - Sending via Gmail  (Read 5979 times)

bwhisler

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • Email
Nettalk 4 - Sending via Gmail
« 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

Flint G

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Email
Re: Nettalk 4 - Sending via Gmail
« Reply #1 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).  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):

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
« Last Edit: December 22, 2013, 10:31:49 PM by Bruce »
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