Hi,
I’ve looked at all the docs, and posts hear regarding sending email in WE and still cant get it to work.
I Have one Form, This form has various contaners in it that are made visible and invisable (it’s a wizard, Step by Step).
I have a property of the form: SMTPServer as SMTPSecureSocket
I have a lot of email sending routines in my desk top apps and they work great. In the WE the lack of events for SMTPSecureSocket to see what if there are any errors has me scratching my head as I can’t figure out what the issue is.
Here is the method that sends the email:
Dim rs as RecordSet
Dim Msg as New EmailMessage
System.DebugLog("In Send Application")
rs = Session.sesDB.SQLSelect("Select * from memapplications where memappkwy = " + Str(Session.gnRecNo))
SMTPServer = New SMTPServer
SMTPServer.Address = csBulkMailSMTPServer
SMTPServer.Port = cnBulkEmailEmailPort
SMTPServer.Username = csBulkMailSMTPUserID
SMTPServer.Password = csBulkEmailSMTPPassword
SMTPServer.ConnectionType = SMTPSecureSocket.SSLv23
SMTPServer.Secure = True
Msg.AddRecipient csEmailAddress
System.DebugLog("Sending email to: " + csEmailAddress)
Msg.subject = "Application Form - " + rs.Field("lastName").StringValue + ", " + rs.Field("firstName").StringValue + " " + rs.Field("middleName").StringValue
Msg.BodyHTML = CreateMsg()
SMTPServer.Messages.Append( Msg)
SMTPServer.SendMail
How can you test if there was an error?
Thanks
Rich