Email Form

Status
Not open for further replies.

fcbcpcri

New Member
Messages
4
Reaction score
0
Points
1
I've searched the forums and can't find out if the free basic hosting can do a form and email you the form
i have downloaded files i found on here php files and some others. Didn't change nothing but added my email where
it said to add them and it don't work. I was gonna use wordpress but its got all the stuff on side and blog i don't know
much about but i just want the form to show thats it any help be appreciated.
Thank You
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi fcbcpcri,

Yes, you can use PHP to send emails on free hosting. However, you may not spoof the "From" header; the "From" header must be an email account that is created on your hosting account.

Thank you,
 

fcbcpcri

New Member
Messages
4
Reaction score
0
Points
1
I've got the one i created through the free hosting on from and to ive got mine all i changed and it dont work it also had pop and smtp files to with it i dropped it in and replaced with 2 email just to see if it works and i dont get no email. If u wanna see files i can put em on here just be when i get home later.
Thanks for your help.
 
Last edited:

nkranx10

Member
Messages
62
Reaction score
2
Points
8
Do you mean a form on your web like :

http://www.british-international-montessori.com/contact_us

Mine works, just get data from a form and use data using simple php mail function eg
<?php
$mailwent = mail( $to,$from,$subject,$message,$headers);

?>
if the mail went $mailwent will return True

$to will be you@gmail.com (or equivalent)
$from will be email of surfer entered in to form
$subject get from form
$message get from form

$headers are optional and can be like:

$headers = "MIME-Version: 1.0 . \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 . \r\n";
$headers.="From: info@domain.com \r\n";
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
$from will be email of surfer entered in to form
Nope, you can't use anything other than an email address that belongs to your hosting account in the From. That's called "spoofing", and it's not allowed on Free Hosting due to the potential for abuse (phishing emails, etc.). If you need to be able to reply to the user, you need to use the ReplyTo header.
 

fcbcpcri

New Member
Messages
4
Reaction score
0
Points
1
Sorry took so long for me to reply i haven't had much time to mess with it. I tried that one put in my email and the servers provided email from the free hosting account and when i hit submit it shows part of the code im new to php i'm trying to get and try to learn how to at least do the mail php but i must not be understanding it im wanting to understand this before i actually pay for a site cause otherwise i would be spending most of that time trying to figure this out. ANYHELP Greatly appreciated.
THANKS!!
 
Last edited:

fcbcpcri

New Member
Messages
4
Reaction score
0
Points
1
Hi fcbcpcri,

Yes, you can use PHP to send emails on free hosting. However, you may not spoof the "From" header; the "From" header must be an email account that is created on your hosting account.

Thank you,
So if i put $from=mysite@pcriot.com then should work right or no what im trying to figure out i put that in one i tested and it dont work heres code i tried

<!-- <?php
$mailwent = mail( $to,$from,$subject,$message,$headers);

?>
if the mail went $mailwent will return True

$to hondarancher@gmail.com
$from flatcreek@fcbc.pcriot.com
$subject get from form
$message get from form

$headers are optional and can be like:

$headers = "MIME-Version: 1.0 . \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 . \r\n";
$headers.="From: flatcreek@fcbc.pcriot.com \r\n";

mail($to,$email_subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: prayer-form-thank-you.html'); -->

this one don't work just dont send and shows part of the php code when u submit
 
Status
Not open for further replies.
Top