Olivier Peeters
Olivier Peeters

Reputation: 61

Swiftmailer SMTP Hotmail doesn't work

I try to send an e-mail with Swiftmailer. But it doesn't work... This is what I tried:

$transport = Swift_SmtpTransport::newInstance('smtp.life.com', 25)
->setUsername('[email protected]')
->setPassword('the correct pasword');

I can't find the solution for solving this problem... *BTW I'm a Dutchman! ;-)

Upvotes: 2

Views: 2200

Answers (3)

Sergiu Sandrean
Sergiu Sandrean

Reputation: 541

You need to set the encryption to tls as the 3rd parameter:

$transport = Swift_SmtpTransport::newInstance('smtp.life.com', 25, 'tls')

Most probably port should also be set to 587

Upvotes: 0

cweiske
cweiske

Reputation: 31088

530 5.7.0 Must issue a STARTTLS command first

You need to configure SwiftMailer to use a SSL connection via STARTTLS. It is supported since version 4.1.3.

Upvotes: 1

vjnrv
vjnrv

Reputation: 91

I think you should change 'smtp.life.com' to 'smtp.live.com'.

Upvotes: 0

Related Questions