idrewuk Posted December 20, 2009 Share Posted December 20, 2009 Hey everyone, Sorry if I'm missing something obvious but I wondered if anybody could help me with my script. I've got a new website, a want to have a contact form on there. I'm trying my script on a test basis but it just will not work, despite trying a few different things! The sendmail.php code is as follows: 1. <?php 2. $email = $_REQUEST['email'] ; 3. $message = $_REQUEST['message'] ; 4. 5. mail( "[email protected]", "Feedback Form Results", 6. $message, "From: $email" ); 7. header( "Location: http://www.explainyourself.co.uk/thankyou.html" ); 8. ?> and in my test webpage I've got the following: # <html> # # <head> # # <title>Form test</title> # # </head> # # <body> # # <form method="post" action="sendmail.php"> # Email: <input name="email" type="text" /><br /> # Message:<br /> # <textarea name="message"></textarea><br /> # <input type="submit" /> # </form> # # </body> My host, Streamline, has a couple of [really bad] support pages on the topic and says: In order for the script to work, you need to specify, via a fifth -f parameter, the domain from which the mail is being sent([email protected]). The PHP component uses SMTP (Simple Mail Transfer Protocol), and all StreamlineNet SMTP servers have filters which ensure that the data returned by either the first or fifth mail parameter relates to one of your domains hosted by StreamlineNet. Is that missing from my code? I'm confused and would love to have this working soon! Any help would be much appreciated... Link to comment https://forums.phpfreaks.com/topic/185802-cant-get-my-sendmailphp-to-work/ Share on other sites More sharing options...
nafetski Posted December 20, 2009 Share Posted December 20, 2009 If you take a look at http://php.net/manual/en/function.mail.php And then look at Example #3 - I think it will specify a bit more what you need to do. Looks like your host wants to make sure that any mail that you are sending, is being sent from a domain that you have hosted with them. My assumption is to bypass SMTP authentication, they do a check on their end to make sure the mail server is set up for your account only. (otherwise they could be used as a zombie super spam server) That would be my first guess at least, good luck! Link to comment https://forums.phpfreaks.com/topic/185802-cant-get-my-sendmailphp-to-work/#findComment-981082 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.