I’ve been successfully sending emails through gmail for years. Now I’ve been asked to send emails through an Office365 account. I looked up the settings online and changed the code but it doesn’t seem to work. Here is the code I’m using.
SMTPSecureSocket.Address = "smtp.office365.com"
SMTPSecureSocket.Username = email_address
SMTPSecureSocket.Password = password
SMTPSecureSocket.Port = 587
SMTPSecureSocket.ConnectionType = SMTPSecureSocket.SSLv23
SMTPSecureSocket.Secure = True