Web Connection
SMTP not sending emails
Gravatar is a globally recognized avatar based on your email address. SMTP not sending emails
  Joel Aiken
  All
  Aug 12, 2017 @ 07:18am

I'm setting up a new server and having trouble getting the SMTP server to work. I've read and re-read the Web Connect documentation, I have the SMTP server installed and running. I have tweaked the SMTP server settings over and over. When I attempt to send emails, I don't get any error messages, and the mailroot folders are all empty. I have a second server (with a different hosting company) which runs SMTP just fine... and I have studied the settings in that site in an attempt to make sure I haven't overlooked something.

The PRG which attempts to send the emails is exactly like the WC docs example.

I know this is a vague question, and I realize I somehow have overlooked a setting, but I can't figure it out.
Any out-of-the-blue comments? Thanks, Joel

Gravatar is a globally recognized avatar based on your email address. re: SMTP not sending emails
  Joel Aiken
  Joel Aiken
  Aug 12, 2017 @ 02:43pm

Here's my code ~Joel

DO wwSmtp && load libraries

LOCAL loSMTP as wwSmtp
loSmtp=CREATEOBJECT("wwSmtp")
loSmtp.nMailMode = 0  && wwIPStuff mode (Win32 - default)   0 - .NET wwSmtp

loSmtp.cMailServer="localhost"
loSmtp.cSenderEmail="joelaiken@gmail.com"
loSmtp.cSenderName="Joel Aiken"

 loSmtp.cUsername = "username"  
 loSmtp.cPassword = "password"



*** Optional SSL Messages (only in .NET mode (nMailMode = 0))
* loSmtp.lUseSsl = .T.

loSmtp.cRecipient="joel@patsyaiken.com"
loSmtp.cSubject="wwSmtp Test Message"

*** Optionally specify content type - text/plain is default
loSmtp.cContentType = "text/html"  
loSmtp.cMessage="Who said this had to be <b>difficult</b>?"

llResult = loSmtp.SendMailAsync()
IF !llResult
   Wait window loSmtp.cErrorMsg
ENDIF

RETURN

Gravatar is a globally recognized avatar based on your email address. re: SMTP not sending emails
  Joel Aiken
  Joel Aiken
  Aug 12, 2017 @ 02:56pm

The server is running Windows server 2016 WebConnect is installed in tre IIS .Net Handler mode Here are screen shots of the SMTP server properties

Gravatar is a globally recognized avatar based on your email address. re: SMTP not sending emails
  Rick Strahl
  Joel Aiken
  Aug 12, 2017 @ 04:47pm

Run SendMail() instead of SendMailAsync() and look at the error message.

If you want to test locally try using PaperCut which lets you easily see what the client is r is actually sending to the server.

+++ Rick ---

© 1996-2017