1
接收電子郵件我不能收到任何電子郵件,但我如果聲明說,郵件發送成功,請大家幫幫忙,這裏是我的控制器是不是在笨
public function index()
{
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '****', //email
'smtp_pass' => '****' //password
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('//email', '//name');
$this->email->to('//recipient');
$this->email->subject('This is a test email');
$this->email->message('Hi, This is a test email. Please advise!');
if($this->email->send())
{
echo 'Your email was successfully sent.';
}
else
{
show_error($this->email->print_debugger());
}
}
BTW我使用本地主機/電子郵件測試它/ index.php/email/index
in localhost ?? –
是的...我還在測試它... – Beldion
我只想確認,它必須爲我活着發送電子郵件?是他們的方式,我可以收到電子郵件,而無需上傳? – Beldion