Topic on Project:Support desk

Jac09876 (talkcontribs)

Has someone Office365 working?

I use a Office365 user with a mailbox (smtp@acme.com) for sending and the following configuration:

$wgSMTP = array(

'host' => "smtp.office365.com", //could also be an IP address

'IDHost' => "acme.com",

'port' => 587,

'auth' => true,

'username' => "smtp@acme.com",

'password' => "PassWord123"

);

When I try to send a Confirmation email for user@acme.com, I get the following message:

Confirm email address

Jump to: navigation, search

Acme wiki could not send your confirmation mail. Please check your email address for invalid characters.

Mailer returned: Failed to send data [SMTP: Invalid response code received from server (code: 550, response: 5.7.60 SMTP; Client does not have permissions to send as this sender)]

I would very grateful for some useful remarks.

- Jac

Jac09876 (talkcontribs)

As a test, the following powershell command works:

Send-MailMessage -From smtp@acme.com -To user@acme.com -Subject "Test Email" -Body "Test SMTP Relay Service" -SmtpServer smtp.office365.com -Credential $msolcred -UseSsl -Port 587

- Jac

Jac09876 (talkcontribs)

And from the Centos server itself, this also works:

echo "This is the message body and contains the message" | mailx -v -r "smtp@acme.com" -s "This is the subject" -S smtp="smtp.office365.com:587" -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user="smtp@acme.com" -S smtp-auth-password="PassWord123" -S ssl-verify=ignore -S nss-config-dir=/etc/pki/nssdb/ user@acme.com

- Jac

Jac09876 (talkcontribs)
Jac09876 (talkcontribs)

Solved!

$wgPasswordSender = "smtp@acme.com";

this must be identical to the username above.

- Jac

Ciencia Al Poder (talkcontribs)