php code error when emailing please help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lebatt
Forum Newbie
Posts: 9
Joined: Sat May 02, 2009 6:43 pm

php code error when emailing please help

Post by lebatt »

**************EDIT***********************

Well I just found out it was because of the SMTP :( All I needed was this ONE little feature and thats all.
Thanks for anyone who read this.
*******************************************************


Hi,

Ok I've been all over and I cant figure this out :(
I'm hosting out of http://www.awardspace.com, I'm using the free webhosting but bought the domain name, It's a simple site but it needs to send a email. Maybe someone who knows alot about php can just look at what the Plan offers.. I know it doesnt offer STMP but that as i know is email forwarding,

Below is my code, I can Really Really use help on this ASAp please and thank you to all or the person who helps me. I will be very appreciative.

I tried
info@318desprairies.com
no-reply@318desprairies.com

I have info@318desprairies.com as a email address there

the website is http://www.318desprairies.com I dont know what I am doing wrong. I had this code working at yahoo hosting on a seperate site at
http://www.concepnovash.com/index1.html

Please help, maybe they require something I dont know.. maybe a special email address. I have to have this site finished tonight and I cant complete it :( **Other parts are under construction right now lol not finished**

my getpass.php code is

Code: Select all

<?php
if(isset($_POST['email']) && !empty($_POST['email']))
   {
$email=$_POST['email'];
// You can edit parts in quotes
$sub="Thank you for checking out the site";
$pass="password";
$message="You can view the password protect
parts with this password: $pass
http://".htmlentities($_SERVER['HTTP_HOST'])."/usepass.php\"";
$succ="Email sent. You may need to check your Spam folder";
// Stop do not edit
mail( "$email", "$sub",
  $message, "From:info@318desprairies.com");
 
  echo $succ;
   
}
else
{
if(isset($_POST['email']))
{
echo"You  did not give an email";
}
echo"
 
<form action=\"getpass.php\" method=\"post\" />
Email<input type=\"text\" name=\"email\" />
<input type=\"submit\" value=\"Enter Email to receive Password\" />";
}
?>

my Homepage where they have to put the email code is this

Code: Select all

<?php
if($_SESSION['verified']!="yes")
{
if(isset($_POST['email']) && !empty($_POST['email']))
   {
$email=$_POST['email'];
// You can edit parts in quotes
$sub="Thank you for checking out the site";
$pass="318DPL";
$message="You can view the password protect parts with this password: $pass
http://".htmlentities($_SERVER['HTTP_HOST'])."/home.php\"";
$succ="Email sent. You may need to check your Spam folder";
$url="yoururl";
// Stop do not edit
mail( "$email", "$sub",
  $message, "From:info@318desprairies.com");
 
  echo $succ;
   echo"<br />
<form action=\"home.php\" method=\"post\" />
Password<input type=\"password\" name=\"pass\" />
<input type=\"submit\" value=\"Agree to Confidentiality Agreement\" />";
}
else
{
if(isset($_POST['email']))
{
echo"You  did not give an email";
}
echo"
 
<form action=\"home.php\" method=\"post\" />
Email<input type=\"text\" name=\"email\" />
<input type=\"submit\" value=\"Submit\" /><br />";
echo"<br />
<form action=\"home.php\" method=\"post\" />
Password<input type=\"password\" name=\"pass\" />
<input type=\"submit\" value=\"Submit\" />";
}
}
?>

**************EDIT***********************

Well I just found out it was because of the SMTP :( All I needed was this ONE little feature and thats all.
Thanks for anyone who read this.
Last edited by Benjamin on Sat May 02, 2009 7:24 pm, edited 1 time in total.
Reason: Changed code type to php.
Post Reply