Closed InfoButler-LinaLu closed 6 years ago
'encryption'=>'START/TLS',
according to swiftmailer docs, that should be 'tls', not 'START/TLS'.
https://swiftmailer.symfony.com/docs/sending.html#the-smtp-transport
I tried tls, but get the following error: Exception
Swift_TransportException
Failed to authenticate on SMTP server with username "emailaddress@domain.com" using 2 possible authenticators
But I am 100% sure that the email address works good and I can send mail via this address by other mail client. However with my code, it don't work.
maybe this helps: https://stackoverflow.com/questions/6077514/set-authentication-method-in-swiftmailer-4-0-6
In any case this is nothing we can fix in yii2-swiftmailer. Most probably it is a configuration problem, if not, please report it to swiftmailer directly.
What steps will reproduce the problem?
Send email with other mailbox succeeded already. Recently my user want to switch the mail server to office 365, so changed the mailbox and did some test, failed to send mail.
The config file was set as below:
What's expected?
mail send success
What do you get instead?
Connection could not be established with host smtp.office365.com [php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known #0]
Additional info