dreamwest Posted January 19, 2009 Share Posted January 19, 2009 A simple question...but ive never done any email scripts before... I want to email mysel when an {if} clause is reached: <?php ////Testing if (yes==yes){ Email stuff here } Link to comment https://forums.phpfreaks.com/topic/141529-email-admin-where-ifyes/ Share on other sites More sharing options...
trq Posted January 19, 2009 Share Posted January 19, 2009 And you are stuck where exactly? Link to comment https://forums.phpfreaks.com/topic/141529-email-admin-where-ifyes/#findComment-740805 Share on other sites More sharing options...
dreamwest Posted January 19, 2009 Author Share Posted January 19, 2009 And you are stuck where exactly? The email part. I want the script to send an email when the if clause has been reached. There have to be headers set but im not sure how to go about it Link to comment https://forums.phpfreaks.com/topic/141529-email-admin-where-ifyes/#findComment-740806 Share on other sites More sharing options...
shlumph Posted January 19, 2009 Share Posted January 19, 2009 What do you have so far? Link to comment https://forums.phpfreaks.com/topic/141529-email-admin-where-ifyes/#findComment-740807 Share on other sites More sharing options...
machupicchu Posted January 20, 2009 Share Posted January 20, 2009 are you looking for something like ths: $to = "[email protected]"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; if (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } Search this forum or Google php email for more examples Link to comment https://forums.phpfreaks.com/topic/141529-email-admin-where-ifyes/#findComment-740816 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.