Jump to content

CAN SOMEONE CHECK MY CODING PLEASE


cyclo3000

Recommended Posts

Hi

 

I'm having trouble with my PHP coding. I had a developer develop my site (flash site) and I'm using Godaddy as my hosting provider and I'm using the Windows IIS7 (which according to Godaddy supports PHP). However the developer says his coding is correct and that the issue is coming from Godaddy.

 

My site is www.jsilvers.com and I have in the PHP code for my contact page to send all messages to my AOL email account. However when I try to send a message I do not recieve any emails or spam emails.

 

Can someone please take a look at the PHP code and let me know if there are any errors. (see below)

 

Thanks

 

Josh

 

 

 

 

<?

$name=$_POST['name'];

$email=$_POST['email'];

$phone=$_POST['phone'];

$message=$_POST['message'];

 

$ToEmail = "cyclo3000@aol.com";

$ToSubject = "Message from your site";

 

$EmailBody =  "Name: $name\n

Email: $email\n

Phone: $phone\n

Message: $message\n";

 

$Message = $EmailBody;

 

 

$headers .= "Content-type: text; charset=iso-8859-1\r\n";

$headers .= "From:".$name." / ".$email."\r\n";

 

mail($ToEmail,$ToSubject,$Message, $headers);

 

?>

 

 

 

Link to comment
Share on other sites

your email server (aol.com) might be blocking it before it even gets to your mailbox to put into a spam folder.

 

i've had issues with aol in the past. i'd try it on a different address. i didn't try your code, but going through it quickly it looks sound. so i'd check the issues with email itself.

 

it could be because it's coming FROM some other url that where your site is... i believe that's part of the reason so many sites send from "do-not-reply@domain.com", and then you can just do a REPLY-TO piece in your header so that when you click the reply button it'd go there.

Link to comment
Share on other sites

Whenever setting the 'From' attribute I've always used the following.

$headers .= "From: ".$name." <".$email.">\r\n";

Always seems to do the job for me, so I'd probably change that part or just remove it as Rhodesa suggested.

 

Edit:

 

I just tested your code and it did work to both my private email and Hotmail address. It was put in my junk email on my private email and worked fine with Hotmail, so it probably is just an issue with AOL.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.