dazzclub Posted March 26, 2008 Share Posted March 26, 2008 Hi all, i am trying to get my form to sumbit to my database and to my email, this is what i am using to send something to my email, just test to get it to work first; -------------- <?php /* Details Of Email */ $to="[email protected]"; $subject="test"; $first_name=$_POST['first_name']; $email=$_POST['email']; $comments=$_POST['comments']; $details= "Email:$clientemail Name:$clientname Message:$message Inquiry:$inquiry "; mail($to,$subject,$details); ?> when i tried the form and then pressed submit it displayed; Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in E:\wamp\www\drinkpromo\enquiry.php on line 86 Now i can make changes to this script but how do i make changes to my phpini. I have looked at the relevant topics and noticed that my sendmail_from and sendmail_path have "no value" besides them, how can i change this?? In theory once these have been set can i then send to my email?? kind regards Dazzclub Link to comment https://forums.phpfreaks.com/topic/97947-solved-changing-the-phpinfo-so-i-can-use-sendmail_from/ Share on other sites More sharing options...
ansarka Posted March 26, 2008 Share Posted March 26, 2008 <?php $to = "[email protected]"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $headers = "From: [email protected]\r\n" . "X-Mailer: php"; if (mail($to, $subject, $body, $headers)) { echo("<p>Message sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?> Link to comment https://forums.phpfreaks.com/topic/97947-solved-changing-the-phpinfo-so-i-can-use-sendmail_from/#findComment-501123 Share on other sites More sharing options...
dazzclub Posted March 26, 2008 Author Share Posted March 26, 2008 Would I be able to send it to my email account when the site i am currently working on his just on my computer?? cheers Dazzclub Link to comment https://forums.phpfreaks.com/topic/97947-solved-changing-the-phpinfo-so-i-can-use-sendmail_from/#findComment-501143 Share on other sites More sharing options...
dazzclub Posted May 7, 2008 Author Share Posted May 7, 2008 To answer my above post, yes. When i uploaded it, it worked. I think if i need to test this locally, i will need to look further into my phpini file and also the php script i use. kind regards Dazzclub Link to comment https://forums.phpfreaks.com/topic/97947-solved-changing-the-phpinfo-so-i-can-use-sendmail_from/#findComment-535508 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.