crlfam Posted March 25, 2009 Share Posted March 25, 2009 I'm looking for a script for my site i'm going to build and when some one clicks on the submit button after paying it emails them a thank you message and download link. Quote Link to comment https://forums.phpfreaks.com/topic/151135-solved-email/ Share on other sites More sharing options...
unska Posted March 25, 2009 Share Posted March 25, 2009 This is the simplest way, you may have to configure your PHP's ini files to make this work. <? $senderName = "The Sender"; // The name of the sender $senderEmail = "email@hotmail.com"; // The email of the sender $receiverEmail = "email@gmail.com"; // The address where you want to send email $emailSubject = "Thanks"; // The subject of the email $emailMessage = "Thank you for viewing my page."; // The message on the email $emailHeader = "From: ". $senderName . " <" . $senderEmail . ">\r\n"; // Header fields mail($receiverEmail, $emailSubject, $emailMessage, $emailHeader); // The command that sends the email ?> Quote Link to comment https://forums.phpfreaks.com/topic/151135-solved-email/#findComment-794000 Share on other sites More sharing options...
crlfam Posted March 25, 2009 Author Share Posted March 25, 2009 dum ? is that for the download link to email too! Quote Link to comment https://forums.phpfreaks.com/topic/151135-solved-email/#findComment-794030 Share on other sites More sharing options...
unska Posted March 25, 2009 Share Posted March 25, 2009 You can write the download link to the $emailMessage -variable. Quote Link to comment https://forums.phpfreaks.com/topic/151135-solved-email/#findComment-794031 Share on other sites More sharing options...
crlfam Posted March 25, 2009 Author Share Posted March 25, 2009 thanks for the help! can i use this on an html website Quote Link to comment https://forums.phpfreaks.com/topic/151135-solved-email/#findComment-794034 Share on other sites More sharing options...
unska Posted March 25, 2009 Share Posted March 25, 2009 I'm glad to help, please make this topic "SOLVED" (http://www.phpfreaks.com/forums/index.php/topic,118755.0.html). Quote Link to comment https://forums.phpfreaks.com/topic/151135-solved-email/#findComment-794037 Share on other sites More sharing options...
crlfam Posted March 25, 2009 Author Share Posted March 25, 2009 can i use this on an html website and about the config php ini how do i do that if i want to use it on a html site Quote Link to comment https://forums.phpfreaks.com/topic/151135-solved-email/#findComment-794045 Share on other sites More sharing options...
unska Posted March 26, 2009 Share Posted March 26, 2009 You have to use it on a web server that has PHP support. As for the PHP ini configuration, I really think you should practice more before starting to modify them. Quote Link to comment https://forums.phpfreaks.com/topic/151135-solved-email/#findComment-794059 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.