php - SMTP Mail not displaying Date in Mail Header -


i using smtp mailing purpose.

here code

$from = "koh<projects@bzinfo.in>"; $to = $sendmail['email']; $subject = $row["title"]; $body = $row["message"]; $headers = array('from' => $from, 'to' => $to, 'subject' => $subject);  $smtp = mail::factory('smtp', array ('host' => $host,'auth' => true,'username' => $username,'password' => $password)); $mail = $smtp->send($to, $headers, $body); 

it displaying the sent time none

what can display time in header of email.

regards

carol

you need include date parameter in header array of email

i.e., 'date'=> date('r', time())

so header array should

$headers = array('from' => $from, 'to' => $to, 'subject' => $subject, 'date'=> date('r', time()); 

here wikipedia page gives smtp transport example here


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -