FoxPro Programming
SMTP and Office386
Hello Rick, i can not send Mail mit WWIPSTUFF over office365 - the Code the runs with every Server not run with office365 -
LOCAL loSmtp as wwSmtp
loSmtp = CREATEOBJECT("wwSmtp")
loSmtp.nMailMode = 0
loSmtp.cMailServer = "smtp.office365.com:587"
loSmtp.nTimeout = 25
loSmtp.lUseSsl = .T.
loSmtp.cUserName = "xx@yy.com"
loSmtp.cPassword = "pasword"
loSmtp.cSenderEmail = "xx@yy.com"
loSmtp.cSubject = " - Gutschrift"
loSmtp.cRecipient = "rrr@oo.com"
loSmtp.cMessage = FILETOSTR("MAIL\MAILBODY_GUTSCHRIFT_STORNO.HTML")
loSmtp.cContentType = "text/html"
loSmtp.AddAttachment(zw_pdf_filename)
loSmtp.AddAttachment("MAIL\PF-LOGO.PNG")
lResult = loSmtp.Sendmail()
have you an idea ?
Thanks from Munich
Check the error message.
Big email services often have other requirements to allow sending SMTP emails from external clients. Not sure about Office 365 but GMail requires a flag in the account settings in account settings to enable SMTP sending for example.
+++ Rick ---