Send email via SMTP

That looks fine as far as I can see. A wild guess, have you specified a from address?

Hi @Gandalf . I have yes:

$mail->setFrom('', '###');
    $mail->addAddress('', 'John');     //Add a recipient        
    $mail->addReplyTo('', '###');

The setFrom and the addReplyTo is the same address.(not sure if that makes a difference or not)

And it is an address that the mail server is configured to send email from? And doesn’t have any typos like your post #43 does?

Oh dear, thats slightly embarrassing (now corrected).

Yes, the address is configured to send email from. In as much as the address is an actual mailbox that is configured in o365.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.