这是我在控制器中的 sendmail 功能
public function sendmail()
{
$this->load->model("common_model");
$admin = $this->common_model->get_admin('email,name');
$this->load->library('email');
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from($_POST['emailId'], $_POST['firstName']);
$this->email->to($admin[0]->email);
$this->email->subject('User Registered For Model :'.base_url());
$message ="<html> \r\n";
$message .="<body> \r\n";
$message .="<table border='0' cellpadding='3' cellspacing='2'>
<tr><td align='left' colspan='2'>Contact Form:-</td></tr>
<tr><th colspan='2'> </th></tr>
<tr><th>Name: </th><td>: ".$_POST['firstName']."</td></tr>
<tr><th>City: </th><td>: ".$_POST['address']."</td></tr>
<tr><th>Email: </th><td>: ".$_POST['emailId']."</td></tr>
<tr><th>Phone: </th><td>: ".$_POST['mobile']."</td></tr>
<tr><th colspan='2'> </th></tr>";
$message .= "</table> \r\n";
$message .= "</body> \r\n";
$message.="</html> \r\n";
$this->email->message($message);
$this->email->send();
redirect('myaccount',$data);
}
我正在使用 wamp 服务器,这是 wamp 服务器的设置
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = you@yourdomain
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path =
我做了哪些更改以将邮件发送到其他服务器?或我的功能中的一些错误。所以我不能向其他邮件服务器发送邮件?