Я пытаюсь отправить электронную почту с помощью CodeIgniter, это код, я использую,Codeigniter электронной почты 550 домен 5.7.1 Отправитель не имеет права
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://sub5.mail.xxxxxxxx.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'xxxxxxxx',
'mailtype' => 'html',
'charset' => 'iso-8859-1',
'wordwrap' => FALSE
);
$this->load->library('email');
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$this->email->clear(TRUE);
$this->email->from($datadatay['hcusemail'], 'FMF Refund Form Data');
$this->email->to("[email protected]");
$this->email->cc("[email protected]");
$this->email->subject("Refund Form");
$this->email->message("The form is attached hereby");
$this->email->set_mailtype("html");
$this->email->attach($_SERVER['DOCUMENT_ROOT']. '/dist/pdf/' . $filename);
$this->email->send();
этот код отлично работает в локальном хосте. но при публикации на сервере я получаю ниже ошибки,
220 homiemail-a119.g.dreamhost.com ESMTP
<br /><pre>hello: 250-homiemail-a119.g.dreamhost.com
250-PIPELINING
250-SIZE 40960000
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250 8BITMIME
</pre><pre>from: 250 2.1.0 Ok
</pre><pre>to: 250 2.1.5 Ok
</pre><pre>to: 250 2.1.5 Ok
</pre><pre>data: 354 End data with <CR><LF>.<CR><LF>
</pre>550 5.7.1 Sender domain not allowed. Please read: http://dhurl.org/20b D157
<br />The following SMTP error was encountered: 550 5.7.1 Sender domain not allowed. Please read: http://dhurl.org/20b D157
<br />Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.<br /><pre>User-Agent: CodeIgniter
Date: Wed, 18 Jan 2017 16:50:59 +0530
From: "FMF Refund Form Data" <[email protected]>
Return-Path: <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: =?iso-8859-1?Q?Refund_Form?=
Reply-To: "[email protected]" <[email protected]>
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="B_ATC_587f4f9b1eb0f"
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ATC_587f4f9b1eb0f
Content-Type: multipart/alternative; boundary="B_ALT_587f4f9b1ead4"
--B_ALT_587f4f9b1ead4
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
The form is attached hereby
--B_ALT_587f4f9b1ead4
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
The form is attached hereby
--B_ALT_587f4f9b1ead4--
--B_ATC_587f4f9b1eb0f
Content-type: application/x-unknown-content-type; name="eranga.docx"
Content-Disposition: attachment;
Content-Transfer-Encoding: base64
--B_ATC_587f4f9b1eb0f--</pre>
Пробовал много вещей, но ничего не работает. Пожалуйста помоги.
Пройдите через [link] (http://dhurl.org/20b) в приведенном выше сообщении об ошибке и устраните проблему –
@ Deep3015 Большое спасибо за ответ. но этот URL-адрес ничто. он показывает только _This является ShortHost URL shortener._ –
Выше ссылка идет на [link] (https://help.dreamhost.com/hc/en-us/articles/215036118) .check it –