Question

I'm trying to use PHP Swiftmail (Laravel Package) but it keeps throwing this stupid exception:

Fatal error: Uncaught exception 'Swift_TransportException' with message 'Expected response code 220 but got code "", with message "+OK The Microsoft Exchange POP3 service is ready. [QwBPADEAUABSADAANwBDAEEAMAAxADMALgBuAGEAbQBwAHIAZAAwADcALgBwAHIAbwBkAC4AbwB1AHQAbABvAG8AawAuAGMAbwBtAA==]"

Anyone come accross this and know how to fix it?

regards

Was it helpful?

Solution

You appear to be connecting on the wrong port. I am able to send via Office 365 using:

$transport = Swift_SmtpTransport::newInstance('smtp.office365.com', 587, 'tls')
              ->setUsername($emailUsername)
              ->setPassword($emailPass)
              ;

Obviously you would need to use the appropriate variables for username and password.

I do encounter regular 'submission rate exceeded' errors though even while using the throttler plugin set at 6.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top