TRemmie Posted April 11, 2008 Share Posted April 11, 2008 Is it possible to use the simple PHP Mail: <?php $to = "someone@example.com"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "someonelse@example.com"; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Sent."; ?> But in the subject line, have it display the Time and Date at the time the PHP script was played? I am using a simple flash email form and I will have all the emails to me, and I want the subject to be the time and date the person filled out the form and submitted. Quote Link to comment https://forums.phpfreaks.com/topic/100738-solved-datetime-mail-subject/ Share on other sites More sharing options...
BlueSkyIS Posted April 11, 2008 Share Posted April 11, 2008 pre-pend some form of date() onto the subject: $subject = date('l dS \of F Y h:i:s A')."Test mail"; Quote Link to comment https://forums.phpfreaks.com/topic/100738-solved-datetime-mail-subject/#findComment-515245 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.