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 } Quote 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? Quote 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 Quote 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? Quote 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 = "recipient@example.com"; $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 Quote Link to comment https://forums.phpfreaks.com/topic/141529-email-admin-where-ifyes/#findComment-740816 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.