我的申请在线。
我已经编写了以下代码,用于将电子邮件发送到指定的电子邮件地址。
我收到flash消息“email send successfully”但我无法收到该电子邮件。可能是什么原因。请帮帮我!
Controller.php这样:
if ($this->form_validation->run() === TRUE)
{ $this->load->library('email');
$name=$this->input->post('fullname');
$sendersemail=$this->input->post('email');
$fromcountry=$this->input->post('countryname');
$message=$this->input->post('contactdetails');
$this->email->from($sendersemail, $name.'From'.$fromcountry);
$this->email->to('a@gmail.com');
$this->email->cc('b@yahoo.com');
$this->email->bcc('c@gmail.com');
$this->email->subject('New Customer Contact from thmywebsite.com');
$this->email->message($message);
$this->email->send();
$this->session->set_flashdata('msg', 'Thankyou for contacting us .We will shortly reply back on this ('.$this->input->post('email').') email ');
redirect(current_url());
}
保持调试器后UPDATE::我得到的输出就像这样
Your message has been successfully sent using the following protocol: mail
From:
Return-Path:
Cc: thbestbookfinder@yahoo.com
Bcc: thebestbookfinder@gmail.com
Reply-To: "lovesangprince@yahoo.com"
X-Sender: lovesangprince@yahoo.com
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <513e08c9def93@yahoo.com>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_513e08c9defa1"
=?utf-8?Q?New_Customer_Contact_from_thebestbookfinder.com?=
This is a multi-part message in MIME format.
Your email application may not support this format.
--B_ALT_513e08c9defa1
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
asd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf
dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf
dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf
dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf
dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsak
--B_ALT_513e08c9defa1
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
asd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsak=
asd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsak=
asd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsak=
asd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsak=
asd fsfsfs d hjfsdjf dsakasd fsfsfs d hjfsdjf dsak
--B_ALT_513e08c9defa1--
答案 0 :(得分:0)
尝试将此代码放在$ this-&gt; send-&gt; email
下面echo $this->email->print_debugger();
如果电子邮件到那里检查您的垃圾邮件