West Wind Internet and Client Tools
SMTP problem
Gravatar is a globally recognized avatar based on your email address. SMTP problem
  Denis Chassé
  All
  May 15, 2022 @ 02:46pm

Hello all,

I'd like to send emails with wwSMTP. I have an account with SMPT2GO.com

DO wwSmtp && load libraries

LOCAL loSMTP as wwSmtp
loSmtp=CREATEOBJECT("wwSmtp")
loSmtp.nMailMode = 0  &&   0 - .NET wwSmtp (defult), 2 - classic wwIPStuff mode  (no-SSL)

loSmtp.cMailServer="mail.smtp2go.com:465"   &&  with port: mail.yourserver.net:547
loSmtp.cSenderEmail="Here I put my email address"
loSmtp.cSenderName="Denis"
loSmtp.cUsername = "Here I put my email address with SMTP2GO"
loSmtp.cPassword = "Here I put the password that goes with my cUserName"
loSmtp.lUseSsl = .T.
loSmtp.cRecipient="email address of the person receiving that email"
loSmtp.cSubject="Bonne journée!"
loSmtp.cContentType = "text/html"  
loSmtp.cMessage="Contenu avec des accents comme é et à"


llResult = loSmtp.SendMail()      

IF !llResult
   Wait window loSmtp.cErrorMsg
ENDIF

After a couple of seconds I receive this message loSmtp.cErrorMsg = waiting delay of the operation has expired

I tried with nMailMode = 2. Result was worst. Endless loop.

Gravatar is a globally recognized avatar based on your email address. re: SMTP problem
  Rick Strahl
  Denis Chassé
  May 16, 2022 @ 08:47am

What does endless loop mean?

If you mean you're hanging you can control the time that the client waits for a connection via the nTimeout property.

What is the error message once it finally does time out?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: SMTP problem
  Denis Chassé
  Rick Strahl
  May 16, 2022 @ 11:41am

Hi Rick,

After loSmtp.cErrorMsg = waiting delay of the operation has expired

Nothing happens after that. email is not sent

loSmtp.nMailMode = 2
loSmtp.nTimeout = 5
llResult = loSmtp.SendMail()      

Still hanging.

Gravatar is a globally recognized avatar based on your email address. re: SMTP problem
  Rick Strahl
  Denis Chassé
  May 16, 2022 @ 09:18pm

I think maybe their docs are wrong about the ports?

I can get a connection with the non-TLS port.

This example says to use port 2525 even for an SSL connection:

https://www.smtp2go.com/setupguide/c-script/

When I use port 2525 (with SSL enabled as the example suggests) I get an auth error (ie. connection to the server and communication). It doesn't work with what they list as their TLS numbers.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: SMTP problem
  Denis Chassé
  Rick Strahl
  May 17, 2022 @ 08:07am

Before trying to use wwSMTP I sent emails through FoxyPreviewer with port 465 without problems. The reason why I'd like to use wwSMTP is that I can't send french characters through FoxyPreviewer. I mean I define object as "Bonne journée.". When I look at the email that I receive, object shows as "Bonne journee."

I changed the port to 587 and that solved the problem. Many thanks for your feedback.

© 1996-2024