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.
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 ---
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.
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 ---
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.