KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Send SMTP using Office 365
PRODUCT: 4D | VERSION: 13.2 | PLATFORM: Mac & Win
Published On: December 6, 2012

Office 365 requires a TLS encryption to support outgoing SMTP. Starting with version 13.2, SMTP_Send supports STARTTLS mode required for Office 365.

//Office 365 account name
$error:=SMTP_Auth($smtp_id;"Office365UserName";"password")

// 2 indicates SMTP server and the port number
$error:=IT_SetPort(2;587)

// 0=zero; communicates with the server and allows switchover if the server requires the connection to be secure
$error:=SMTP_Send($smtp_id;0)


For more information regarding SMTP_Send, please visit http://doc.4d.com/4Dv13.2/help/Command/en/page88989.html

Commented by Kipp Hollingsworth on December 13, 2012 at 11:52 AM
TIP!: Your Office 365 username should be your email address.