bug fixing
Showing
... | ... | @@ -103,27 +103,13 @@ |
} | ||
function send_mail($subject,$email,$message,$attach=null) { | ||
$ci =& get_instance(); | ||
$ci->load->library('email'); | ||
$ci->email->initialize(array( | ||
'protocol' => 'smtp', | ||
'smtp_host' => 'smtp.sendgrid.net', | ||
'smtp_user' => '[email protected]', | ||
'smtp_pass' => 'Golden_123', | ||
'smtp_port' => 587, | ||
'crlf' => "\r\n", | ||
'newline' => "\r\n" | ||
)); | ||
$ci->email->from('[email protected]', 'DcarFixxers'); | ||
$ci->email->to($email); | ||
$ci->email->cc('[email protected]'); | ||
$ci->email->subject($subject); | ||
$ci->email->message($message); | ||
$ci->email->set_mailtype('html'); | ||
if($attach != null) { | ||
$ci->email->attach($attach); | ||
} | ||
return $ci->email->send(); | ||
$headers = "MIME-Version: 1.0" . "\r\n"; | ||
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n"; | ||
$headers .= "From: [email protected] \r\n"; | ||
$headers .= "Reply-To: ". $email. "\r\n"; | ||
$headers .= "X-Mailer: PHP/" . phpversion(); | ||
$headers .= "X-Priority: 1" . "\r\n"; | ||
mail($email, $subject, $message, $headers); | ||
} | ||
?> | ||
\ No newline at end of file |
Please
register
or
sign in
to comment