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

1. Exception info

Swift_TransportException
Expected response code 220 but got code "502", with message "502 Error: command not implemented "

2. Mail Config

return array(
    'driver'     => 'smtp',
    'host'       => 'smtp.exmail.qq.com',
    'port'       => 25,
    'from'       => array('address' => 'admin@mydomain.net', 'name' => 'admin'),
    'encryption' => 'tls',
    'username'   => 'myusername',
    'password'   => 'mypassword',
    'sendmail'   => '/usr/sbin/sendmail -bs',
    'pretend'    => false,
);

3. Code

$data['message'] = 'test';
Mail::send('emails.welcome', $data, function($message)
{
    $message->to('x@qq.com', 'test')->subject('test');
});

How can I solve this problem ?

Last updated 3 years ago.
0

This smtp host doesn't support TLS,when I remove 'encryption' => 'tls', Mail::send() is ok.

Anyone has good ides?

Last updated 3 years ago.
0

Sorry, not trying to be rude but if the SMTP server doesn't support TLS, isn't the only solution to remove the TLS encryption setting as you said above? :)

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

xie123hil xie123hil Joined 1 Mar 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.