我正在使用Codeiginiter框架的电子邮件类,它从地址发送邮件,它也是从www守护程序apache
发送邮件。
我正在使用linux openSUSE OS。我希望它只发送来自地址的邮件。
$this->load->helper('email');
$email = $this->input->post('email');
$message1 = "<pre>Dear < First/Last Name (Or Username) >,";
$message2 = "<br/>You received this email because someone requested a password reminder for this email address.To reset your password, please ";
$message3 = $message2."<br/>click on the URL below. If it is not clickable, please copy and paste the URL into your browser's address bar:<br/>";
$message = $message1.$message3.site_url() . "`enter code here`/main/signup_mail/" . $rand_number;
$subject = "Confirmation to ecommunication";
//$headers = 'From: your@example.com' . "\r\n";
"mail status:- " . send_email($email, $subject, $message, 'O DeliveryMode=b');
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from('your@example.com', 'your');
$this->email->to($email);
$this->email->subject($subject);
$this->email->message($message);
$this->email->send();