martin20009 Posted March 12, 2006 Share Posted March 12, 2006 I downloaded the tutorial Creating a mail form wth php and flash.I am having problems with the code.<?php$to = "you@yourdomain.com";$msg = "$name\n\n";$msg .= "$message\n\n";mail($to, $subject, $msg, "From: My web site\nReply-To: $email\n");?>[/code]But the problem is that my website host 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. 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 and gives me the following code,<?php$message, "From: $email", "fuser@userdomain.com" );?>Where do i place this line of code in the the sorce code I am new to this and any help would be greatThanksMartin Quote Link to comment https://forums.phpfreaks.com/topic/4788-form-to-mail-code/ Share on other sites More sharing options...
hitman6003 Posted March 12, 2006 Share Posted March 12, 2006 [code]mail($to, $subject, $msg, $headers, "-f someuser@somedomain.com");[/code]Essentially, it forces the header to look like it's coming from that person. Quote Link to comment https://forums.phpfreaks.com/topic/4788-form-to-mail-code/#findComment-16814 Share on other sites More sharing options...
martin20009 Posted March 13, 2006 Author Share Posted March 13, 2006 I know it may be a stuip question, do I delete any lines of the original code, and where do I inset this peice of code you have posted.Thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/4788-form-to-mail-code/#findComment-16931 Share on other sites More sharing options...
wildteen88 Posted March 13, 2006 Share Posted March 13, 2006 Just replace this code:[code]mail($to, $subject, $msg, "From: My web site\nReply-To: $email\n");[/code]with:[code]mail($to, $subject, $msg, "From: My web site\nReply-To: $email\n", "-f someuser@somedomain.com");[/code] Quote Link to comment https://forums.phpfreaks.com/topic/4788-form-to-mail-code/#findComment-16936 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.