RE: [PHP] w.r.t. mail() function
| From: | admin | Date: | Wed, 23 May 2012 04:24:25 +0000 |
| Subject: | RE: [PHP] w.r.t. mail() function | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-317934@lists.php.net to get a copy of this message | ||
-----Original Message-----
From: Ashwani Kesharwani [mailto:ashwani.kesharwani@gmail.com]
Sent: Wednesday, May 23, 2012 12:13 AM
To: php-general@lists.php.net
Subject: [PHP] w.r.t. mail() function
Hi ,
I have a query w.r.t. mail() function in php.
I have hosted my site and i have created an email account as well.
when i am sending mail to different recipient from my php script using above
function it is getting delivered to respective recipients as expected.
However if I want to see those mail in the sent folder of my email account ,
i can not see those mails there.
How can I achieve this.
Any suggestions.
Regards
Ashwani
-------------------------------------------------------------
You can change the settings of sendmail
http://www.devshed.com/c/a/Administration/Getting-Started-with-Sendmail/12/
OR
You can log text or database each email.
$query = "INSERT INTO mail_log
(
subject,to,from,message,mail_date)
values ('".mysql_real_escape_string( $subject )."',
'".mysql_real_escape_string( $to )."', '".mysql_real_escape_string(
$from
)."', '".mysql_real_escape_string( $message )."',
'".date("Y-m-d H:i:s")."')
";