Support the ongoing development of Laravel.io →
posted 10 years ago
Mail

I had a Laravel 4.2. setup om WAMP (Windows Server 2008, where the mail function was working) but moved the system to IIS 8, WIndows Server 2012 R2 and suddenly the mail function stopped working.

I use an external SMTP server, which is hosted by my hosting company. Here's my settings:

'driver' => 'smtp', 'host' => 'smtp.my-host.se', 'port' => 587, 'from' => array('address' => "example@mail.com", 'name' => "Example name"), 'encryption' => 'tls', 'username' => "user@host.se", 'password' => "********", 'sendmail' => '/usr/sbin/sendmail -bs', 'pretend' => false,

Here's the error I recieve:

{"error":{"type":"ErrorException","message":"stream_socket_enable_crypto(): Peer certificate CN=*.my-host-name.se' did not match expected CN=smtp.my-host.se'","file":"D:\Dir1\Dir2\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php","line":95}}

I've changed the details to my account as you can see.

Any ideas why this error is created, and how to solve it?

Thanks!

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Tibbelit tibbelit Joined 28 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.