Buy Domain Name, Domain Name Registration Domain Transfer & Free Web Hosting on LimeDomains
Search for:
View unanswered posts | View active topics It is currently Wed Apr 16, 2014 4:11 am



Post new topic Reply to topic  [ 1 post ] 
 Simple PHP Sending E-mails 
Author Message

Joined: Thu Dec 16, 2010 10:53 am
Posts: 9
Post Simple PHP Sending E-mails
Hi

I'm trying to send a simple email directly from an online form, using a simple php script. (see below)

It works on my machine ("localhost", (using xampp), and the email is sent from the form to my email address, hosted with another hosting company), but when I upload the page to the host here the email won't send (its acting as if it's sent it, but the mail never arrives, eg: the form displays > fill in the form > click 'send' > page is processed > confirmation message is displayed > no email ever arrives )

any ideas as to why the email can't be sent from limeWebs / gotoNames host?


//the script below is not my own creation - its from the W3C (http://w3schools.com)
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
//the below email address is correct on my script - below is a dummy address
mail("me@my_email_address.com", "$subject",
$message, "From:" . $email);
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
}
?>


Wed Jul 20, 2011 2:13 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

 
Jump to:  
cron