使用plesk server 12.5 windows发送的codeigniter邮件无效

时间:2017-09-06 10:22:42

标签: php codeigniter email plesk

错误就是这样。

Warning: mail(): SMTP server response: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. 

我在服务器中使用7.0.3 PHP版本。

我尝试了很多,但没有工作。

`$config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'ssl://smtp.gmail.com',
    'smtp_port' => 465,
    'smtp_user' => 'useremail',
    'smtp_pass' => 'yyyyyy',
    'mailtype'  => 'html', 
    'charset'   => 'iso-8859-1',
    'wordwrap'   => TRUE,
    'newline'   => "\r\n"
    ); $this->load->library('email',$config);`

 The mail is going by using port 465. but they created a email from server. what i want is, the mail should go from server email address. Internal mail is working.we are using odin plesk 12.5 server. is it possible to send mail without giving the gmail  username and password? i think need to change the setting in mail server. how to change it? please help me. 

1 个答案:

答案 0 :(得分:0)

经过很长时间,plesk客户支持给出了smtp主机名。我正在使用plesk服务器12.5版本。这是代码

$config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'dedrelay.secureserver.net',
    'mailtype'  => 'html', 
    'charset'   => 'iso-8859-1',
    'wordwrap'   => TRUE
    );
    $this->load->library('email',$config);