0

我的申请在线。

我已经编写了以下代码,用于将电子邮件发送到指定的电子邮件地址。

我收到 Flash 消息“电子邮件发送成功”,但我无法接收电子邮件。可能是什么原因。请帮我!

控制器.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());
      }

更新:保留调试器后:我得到这样的输出

    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--
4

1 回答 1

0

尝试将此代码放在 $this->send->email 下面

echo $this->email->print_debugger();

如果电子邮件发送到那里,请检查您的垃圾邮件

于 2013-03-11T04:13:20.090 回答