Jump to content

Form email with php unreliable


xcandiottix

Recommended Posts

I'm constructing a site that has a few different areas in which an email is constructed and sent by php. So far, I've noticed that about 1 in 3 never make it to their destination. Since it would seem that the code is right, could anyone give an explanation as to why this occurs? The site i'm working on is on a godaddy linux with php 5.0. It's a paid account so I don't think they would be limiting the site from creating email. Any ideas?

 

Here's my code just to make sure that's ok.

$from = $Email;
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$from."\r\n";
$headers .= "Return-Path: ".$from."\r\n";
$spamIP = $_SERVER['REMOTE_ADDR'];
$to = 'me@email.com';
$subject = "Application Proposal";
$body = 'Suggestion request.';
mail($to, $subject, $body, $headers);

 

Link to comment
Share on other sites

Well, the email accounts are separate from the actual server account. So the from may be "no-reply@site.com" which doesn't really exist or might be "admin@site.com" which does exist but i'm not positive its part of the server.... rather a service included with the hosting package but may be hosted somewhere else.

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.