CakeEmail problems on server

送分小仙女□ 提交于 2019-12-04 16:55:18

Probable Causes:

  1. Does the server your running from have a spam block on its IP addresses? Chances are the SMTP server is not permitting the connection from your hosting server. Thus the error CONNECTION REFUSED. It is not something on the server you are running the code from, but the server you are trying to log in to.

  2. The SMTP credentials are not correct. Maybe there is something missing. Try connecting using those credentials from another location to see if you can actually connect.

  3. Are the SMTP credentials for the same host you are running from. Maybe the host doesn't permit the outbound connection to SMTP to prevent their servers from being used as a spam sending machine.

Possible Solutions

If none of the probably causes are the culprit, maybe there is a problem with the configuration. You have this:

public $default = array(
    'transport' => 'Smtp',
    'from' => array('info@olvi.cz' => 'My Site'),
    'host' => 'smtp.savana.cz',
    'port' => 25,
    'timeout' => 30,
    'username' => 'info@olvi.cz',
    'password' => '****',
    'client' => null,
    'log' => false,
);

Try simplifying it and changing it to the bare minimums:

public $default = array(
    'transport' => 'Smtp',
    'host' => 'smtp.savana.cz',
    'port' => 25,
    'username' => 'info@olvi.cz',
    'password' => '****',
);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!