Mailto Problem. Been messing with it for days! PLEASE HELP!!

the mail() function

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 51
Joined: Wed Jan 25, 2006 6:24 pm
Location: Philippines,Davao City

Postby trestian » Wed Feb 08, 2006 5:18 pm

Good day tsvehla1220!

I hope this will help you even it is a late reply..

I have seen you code seem it is good the only problem is the mail function:


you have problem in To and From in the mail function...

To: is for the reciepient
from: the sender

//////// Your Code/////

But if I fill out


It goes!

Yes it wil work since you have specified in your mail function that the To: will be If the users inputed email that will not equal to it will not send since your
mail(to:is not equal to,Subject,Message,From) coz you have specified in your mail function that the To: is

<? ///your code
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "", "Feedback Form Results",
$message, "From: $email" );
header( "Location:" );


$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "$email", "Feedback Form Results",
$message, " " );
header( "Location:" );

correct me if im wrong...God Bless

User avatar
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK

Postby bezmond » Sat Feb 11, 2006 2:10 am

Or, do you mean it as a feedback style form, i.e. they fill out the form to send to you? If that's the case, then unfortunately it won't work quite how you are trying to do it...

You would need to send the e-mail from an e-mail address that uses the same domain as you are on (for example is a different domain), and so would not work as the from address, you would need to put their address as part of your e-mail:

Code: Select all

$message = $email."<br>".$message;
or something like that...


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest