Skip to content
smtp365

Set up WordPress to send with smtp365

WordPress contact forms, orders and password resets sent from your Microsoft 365 mailbox, using an SMTP plugin.

With WP Mail SMTP, you can send WordPress email through smtp365 and your Microsoft 365 mailbox. The English field names below are references from the plugin's documentation; interface translations depend on the installed version.

Before you start

Connect your Microsoft 365 mailbox to smtp365, then create a dedicated credential in the dashboard and keep its username and password. Use these details, not your Microsoft 365 password.

Use the sender address configured for the credential: the connected mailbox or a shared mailbox verified with a test message. Any other address is rejected.

Check that your hosting allows outbound connections on port 587, or on 465 with implicit TLS. If both are blocked, ask the provider to open one of them.

Settings

  1. Install and activate WP Mail SMTP from the WordPress plugins page.
  2. Open the plugin settings, then the general tab (Settings > General in the English interface).
  3. In the sender email field (From Email), enter the authorised sender and enable the option to enforce that address (Force From Email). Email from other plugins will then use the same sender.
  4. In the sender name field, enter your company name or the name you want recipients to see.
  5. Choose sending through a generic SMTP server, Other SMTP. The Microsoft 365/Outlook option connects directly to Microsoft and does not use smtp365.
  6. Enter mail.smtp365.it as the SMTP host, choose TLS encryption and set port 587. TLS in this plugin means STARTTLS. If visible, leave Auto TLS enabled. Enable authentication and enter the smtp365 credential's username and password. Alternatively, choose SSL and port 465 for implicit TLS.
  7. Save the settings.

To configure the password through wp-config.php, follow the plugin's constants documentation: you must enable WPMS_ON and define WPMS_SMTP_PASS. The password constant alone does not enable this mode.

Test

Open the plugin tools and the email test page (Tools > Email Test in the English interface). Send to your own address and check the sending log in smtp365. Then test the contact form and other website email. If the form uses the visitor's address, put it in Reply-To while keeping the authorised address as the sender.

If the device reports an error

Many devices show the code they got from the server. You will also find it in the dashboard's sending log, next to the message.

535

Invalid credentials

Wrong user or password, or the credential has been disabled. Copy the user and password again from the dashboard: if you no longer have the password, generate a new one. If you use port 25, check that it is enabled for that credential.

553

Sender not allowed

Each credential can only send with its own address. On the device, set the sender to the address of the connected mailbox, or of the shared mailbox you have verified.

454

Mailbox needs reconnecting

Microsoft asked for a new sign-in, for example after a password change. Open the dashboard and reconnect the mailbox: the device credentials stay the same.

451

Limit reached, try again later

Microsoft 365 or the credential's limit slowed sending down for a few minutes. Almost every device retries on its own; if it keeps happening, check the log to see who is sending so much.

552

Message too large

The message exceeds the mailbox limit, usually 35 MB. Lower the scan resolution or format, or split it into several sends.

550

Sending refused

The monthly quota is used up, the subscription is not active, or Microsoft 365 refused the sender. The text next to the code says which: if it is not clear, write to us.

The device cannot connect to the server at all? Check that the office firewall lets the chosen port out and that the device supports encrypted connections: some very old models need a firmware update.