FoxPro Programming
SMTP and Office386
Gravatar is a globally recognized avatar based on your email address. SMTP and Office386
  Christian Gaigl
  All
  Jun 2, 2020 @ 12:06am

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

Gravatar is a globally recognized avatar based on your email address. re: SMTP and Office386
  Rick Strahl
  Christian Gaigl
  Jun 2, 2020 @ 12:28am

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

© 1996-2024