5.7.1 <cluster_ovh>: клиентский хост отклонен: доступ запрещен - PullRequest
0 голосов
/ 06 сентября 2018

В настоящее время я работаю над приложением с Zend Framework 3, размещенным в OVH. Я пытаюсь отправить почту с Zend_Mail, но безуспешно ... так вот мой код:

$message = new Message();
$message->addTo('client_name@gmail.com')
        ->addFrom('email_account@host.com')
        ->setSubject('Test subject!')
        ->setBody("Test Body!");

// Setup SMTP transport using LOGIN authentication
$transport = new SmtpTransport();
$options   = new SmtpOptions();

$transport->setOptions($options);
$transport->send($message);

И в моем SmtpOptions.php файле:

protected $name = 'OVH';

/**
 * @var string
 */
protected $connectionClass = 'smtp';

/**
 * Connection configuration (passed to the underlying Protocol class)
 *
 * @var array
 */
protected $connectionConfig = [
   'ssl'      => 'ssl',
   'auth'     => 'login',
   'username' => 'my_username',
   'password' => 'my_pass'
];

/**
 * @var string Remote SMTP hostname or IP
 */
protected $host = 'ssl0.ovh.net';

/**
 * @var int
 */
protected $port = 465;

У меня 5.7.1: доступ запрещен ошибка, и я не могу понять, почему? Любая помощь будет признательна! :) Дайте мне знать, если неясно или вам нужна другая информация.

...