justsomeguy Posted September 3, 2008 Share Posted September 3, 2008 Your headers need to be separated with \r\n, not just \n. Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 3, 2008 Author Share Posted September 3, 2008 I changed the script for what you said. Here's the new code: <?if (($_POST[sender_name] == "") || ($_POST[sender_email] == "") || ($_POST[message] == "")) { header ("Location: simple_form.html"); exit;}$msg = "E-mail sent from scpadonline.com\n";$msg .= "Sender's Name:\t$_POST[sender_name]\n";$msg .= "Sender's E-mail:\t$_POST[sneder_email]\n";$msg .= "Message:\t$_POST[message]\n";$to = "scpad@att.net";$subject = "Web site Feedback";$mailheaders = "From: My Website <scpad@att.net>\r\n";$mailheaders .= "Reply-To: $_POST[sender_email]\r\n";mail($to, $subject, $msg, $mailheaders);?><html><head><title>Simple Feedback Form Sent</title></head><body><p><h1> The following e-mail has been sent:</h1></p><p><strong>Your Name:</strong><br><? echo "$_POST[sender_name]"; ?></p><p><strong>Your E-Mail Address:</strong><br><? echo "$_POST[sender_email]"; ?></p><p><strong>Message:</strong><br><? echo "$_POST[message]"; ?></p></body></html> But it still gave me the same errors. Here is the error message:Warning: mail() [function.mail]: Failed to Receive in send_simpleform.php on line 16Fatal error: Maximum execution time of 30 seconds exceeded in send_simpleform.php on line 24Is there anything else i need to do or did i not change the script right?please let me know,youngwebmaster Link to comment Share on other sites More sharing options...
justsomeguy Posted September 3, 2008 Share Posted September 3, 2008 I've never seen an error that says "failed to receive" when you're trying to send an email. I'm not sure what it is trying to receive that it's failing on. It might be that it's trying to connect to the outgoing mail server to give it the new email but the server isn't receiving the new email to send. What mail server and port are you using this with? Does your ISP require authentication to use their mail server? Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 3, 2008 Author Share Posted September 3, 2008 my stmp is fmailhost.isp.att.net and the port is 465. And yes it does require authentication. Like i said previously, i am new to php and mailing with php. What does authentication mean? Link to comment Share on other sites More sharing options...
justsomeguy Posted September 3, 2008 Share Posted September 3, 2008 Authentication means it needs a username and password to accept the mail. The plain PHP mail function doesn't support authentication, if you need to use that you'll need to use a package like Pear to send the mail. There are some examples here:http://email.about.com/od/emailprogramming...qt/et073006.htm Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 3, 2008 Author Share Posted September 3, 2008 thank you. I will install PEAR and let you know if it helps. Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 4, 2008 Author Share Posted September 4, 2008 For the record, I'd suggest hMail Server as a mail server. I have yet to see another Windows mail server that is free while also having all of the features they have. Heck, it's open source even.Do you use this server? Is it good? Is it good quality? Please let me know because i'm thinking about downloading it. Oh and also i will post about pear at a later date becase i have not had a chance to download it yet.Thank you,youngwebmaster Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 4, 2008 Author Share Posted September 4, 2008 I have decided to download hMail Server. That way instead of having to make my php script use pear on development and then me having to go back and change it so it won't when i get it on a live server, it will still be the same code. So thank you. I will most likly be asking more questions as i go along so please do not stop looking at this topic. thank you and i'll post soon,youngwebmaster Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 5, 2008 Author Share Posted September 5, 2008 hmail server SUCKS!!! It sent a email within my localhost but i can't find it!?! Plus from reading some of the logs it keeps, it's trying to send viruses in the emails!!! If anyone knows about this or a better way to go about this let me know. Otherwise i think i might check out argosoft mail server .later,youngwebmaster Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 5, 2008 Author Share Posted September 5, 2008 Ok i was alittle testy up on my other post, sorry. All i want to know is, how it works with apache, how to get my emails off my localhost, and any other info you can give.thanks,youngwebmaster Link to comment Share on other sites More sharing options...
justsomeguy Posted September 6, 2008 Share Posted September 6, 2008 Just configure your mail client with the appropriate settings. The mail server is localhost, etc. It should only keep emails at the server if you emailed to an address like test@localhost. The mail server doesn't really work with Apache, the web server and mail server are two different things. Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 6, 2008 Author Share Posted September 6, 2008 ok. How do i view my emails that were sent to a localhost email address? Link to comment Share on other sites More sharing options...
justsomeguy Posted September 8, 2008 Share Posted September 8, 2008 You configure your mail client to connect with the server and retrieve mail like you do with anything else. Have you configured a mail client before? Check the settings in both the client setup and the server setup to see what's there. Link to comment Share on other sites More sharing options...
sweinkauf13 Posted September 13, 2008 Author Share Posted September 13, 2008 Ok, ya have never done any of this before. But i do have someone that is provideing me with help. If it does not work after that i will post accordingly.thanks,youngwebmaster Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.