The form works perfectly but when it sends mail the from address which the recipient receives, inserts the address as as the following:
From: phpFormGenerator@myhostingcompany.com.
I want it to say something like gift@mydomain.com Where do I change the code to resolve this problem?
thanks,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the process.php file you will find a line that looks like this,
mail($dbemail,"Form Submitted at your website",$message,"From: phpFormGenerator");
Create a line just above this one like this,
$emailfrom="From: gift@mydomain.com";
Then change the mail function line to this,
mail($dbemail,"Form Submitted at your website",$message,$emailfrom);
Ignoring everything else in my example mail function, you are only changing the last portion of your mail function.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you saying that the email that YOU receive has the above email address in it? I think the phpFormGenerator will only send to one email address (and always to the same email address), unless you modify the code manually. It should always come to you (to the email that you specified). Your
If you go to the folder where your form is (originally it is in the /USE folder), and open up the process.php file.
Look for the line that says:
mail("phpFormGenerator@myhostingcompany.com","Form Submitted at your website",$message,"From: phpFormGenerator");
You can change the email address it comes from [phpFormGenerator@myhostingcompany.com], the subject of the email [Form Submitted at your website], and who it's from [From: phpFormGenerator].
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Don't confuse the issue. The poster masterwebman asked how to change the "From:" email address.
The mail function has the following syntax:
mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] )
The $additional_headers, or fourth field, is where to specify the "From:" email address. By default the phpFormGenerator inserts the following "From:" field:
"From: phpFormGenerator"
When the web host sends this email it may, or may not, append the domain name to the message such that, when received, the message appears to come from "phpFormGenerator@domainname".
This is the issue being addresses and the instructions are correct.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks,
The code line was not the same,
mail("gift@mysite.com","Form Submitted at your website",$message,"From: phpFormGenerator");
I then replaced the defaul from: phpformgenerator... to my email address and it correct now.
Thanks very much
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A form has a field "email address." I want the data entered in that field to populate the From field on email sent by phpFormGenerator. Is that possible?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you are using the generator version 2.09 the following is true:
In the process.php file you will find a line that looks like this,
mail($dbemail,"Form Submitted at your website",$message,"From: phpFormGenerator");
Create a line just above this one like this,
$emailfrom="From: gift@mydomain.com";
Then change the mail function line to this,
mail($dbemail,"Form Submitted at your website",$message,$emailfrom);
Ignoring everything else in my example mail function, you are only changing the last portion of your mail function.
Had you read the remainder of the thread you posted on your would have found this exact text.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The form works perfectly but when it sends mail the from address which the recipient receives, inserts the address as as the following:
From: phpFormGenerator@myhostingcompany.com.
I want it to say something like gift@mydomain.com Where do I change the code to resolve this problem?
thanks,
In the process.php file you will find a line that looks like this,
mail($dbemail,"Form Submitted at your website",$message,"From: phpFormGenerator");
Create a line just above this one like this,
$emailfrom="From: gift@mydomain.com";
Then change the mail function line to this,
mail($dbemail,"Form Submitted at your website",$message,$emailfrom);
Ignoring everything else in my example mail function, you are only changing the last portion of your mail function.
Are you saying that the email that YOU receive has the above email address in it? I think the phpFormGenerator will only send to one email address (and always to the same email address), unless you modify the code manually. It should always come to you (to the email that you specified). Your
If you go to the folder where your form is (originally it is in the /USE folder), and open up the process.php file.
Look for the line that says:
mail("phpFormGenerator@myhostingcompany.com","Form Submitted at your website",$message,"From: phpFormGenerator");
You can change the email address it comes from [phpFormGenerator@myhostingcompany.com], the subject of the email [Form Submitted at your website], and who it's from [From: phpFormGenerator].
Don't confuse the issue. The poster masterwebman asked how to change the "From:" email address.
The mail function has the following syntax:
mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] )
The $additional_headers, or fourth field, is where to specify the "From:" email address. By default the phpFormGenerator inserts the following "From:" field:
"From: phpFormGenerator"
When the web host sends this email it may, or may not, append the domain name to the message such that, when received, the message appears to come from "phpFormGenerator@domainname".
This is the issue being addresses and the instructions are correct.
thanks,
The code line was not the same,
mail("gift@mysite.com","Form Submitted at your website",$message,"From: phpFormGenerator");
I then replaced the defaul from: phpformgenerator... to my email address and it correct now.
Thanks very much
A form has a field "email address." I want the data entered in that field to populate the From field on email sent by phpFormGenerator. Is that possible?
If you are using the generator version 2.09 the following is true:
In the process.php file you will find a line that looks like this,
mail($dbemail,"Form Submitted at your website",$message,"From: phpFormGenerator");
Create a line just above this one like this,
$emailfrom="From: gift@mydomain.com";
Then change the mail function line to this,
mail($dbemail,"Form Submitted at your website",$message,$emailfrom);
Ignoring everything else in my example mail function, you are only changing the last portion of your mail function.
Had you read the remainder of the thread you posted on your would have found this exact text.