Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
What's wrong with my PHP mail
Old 10-05-2007, 01:34 AM What's wrong with my PHP mail
Average Talker

Posts: 17
Name: Trung
Trades: 0
My PHP mail works properly with normal email address, but with spam protecting mail like Yahoo it is marked as Spam. Do you guy know why?

This is my code:

// send email;
// $content_main
$to = "$customer_email";
$subject = $LG["word_hi"]. $customer_name;

$headers = "";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=utf-8\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "From: $admin_name <$admin_email> \r\n"
. "To: $customer_name <$customer_email> \r\n"
. "Reply-to: <$admin_email> \r\n"
. "Return-path: <$admin_email> \r\n"
. "X-Mailer: PHP/" . phpversion();

$message = $LG["word_dear"]." $customer_name ."
--------------------------<br>
$content_main
<br>----------------------------<br>".
$LG["email_goodbye"];

mail($to, $subject, $message, $headers);
hopviet is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-05-2007, 12:16 PM Re: What's wrong with my PHP mail
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Yahoo tends to block php generated emails.

You could try adding more headers (Send an email to yourself and take a look at them), but there is actually very little you can do to prevent this.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 10-05-2007, 12:37 PM Re: What's wrong with my PHP mail
Novice Talker

Posts: 6
Trades: 0
Yeah, if you are sending mail from a fairly new domain / IP address you will get your mail blocked. If you give it some time and dont get reported as spam for a long period whilst still sending out consentual emails to clients you will eventually get white listed and start appear in inboxes.

Its a real pain but it is more about doing things the right way to get your mail out of the spam box.

Jim
jimbo2779 is offline
Reply With Quote
View Public Profile
 
Old 10-05-2007, 01:23 PM Re: What's wrong with my PHP mail
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Ditto to the above, You just need to note the stuff as not spam and hope Yahoo figures out what it is.

It will take a good few months.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 10-05-2007, 02:14 PM Re: What's wrong with my PHP mail
Average Talker

Posts: 17
Name: Trung
Trades: 0
LOL is there any language other than PHP that can help with this?
hopviet is offline
Reply With Quote
View Public Profile
 
Old 10-05-2007, 03:20 PM Re: What's wrong with my PHP mail
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
No, it's based around Yahoo/email clients checking to see if your domain is safe to receive emails from. It's really does not matter what language you use.

Though you could use alternatives to the mail() functions. Such as the pop3 emails functions in PHP, instead of coming from apache the email comes from an email client and is more likely to be accepted.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 10-08-2007, 01:25 AM Re: What's wrong with my PHP mail
Average Talker

Posts: 17
Name: Trung
Trades: 0
I don't get it you mean i have to wait for Yahoo and other site like MSN,... to review my host?
What happen if i change my host again? Every new sites experience this?
hopviet is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to What's wrong with my PHP mail
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.61319 seconds with 12 queries