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
php handling bad mail adresses AKA "bounce back emails"
Old 09-18-2009, 02:27 PM php handling bad mail adresses AKA "bounce back emails"
Average Talker

Posts: 15
Name: taylor
Trades: 0
I set up a system where an email is sent out to the customer when you input their info into the system.... nothing fancy. I simply need to be notified if the email address that i am sending to is not valid (old email, mistyped, ect....).

i understand that php mail() funtion should be able to hand this either using the fifth parameter '-f' myemail@gmail.com

however when i do this- even if the $to email address is valid the email is not sent, and i get and error message at the "myemail@gmail.com" account telling me that the $to email adress is not valid- although it is.

im also a little confused bc i looked around and it appears you can also use additional headers to handle bounce back emails. what is the best way to do this. - also do i need to change some settings on my server. this is hosted with HostGator.


$mailto="whoever@gmail.com";
$subject="testing17";
$message= 'hello person this is just a testing message';
code

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: th718522@gmail.com' . "\r\n";
$returnaddress="th718522@gmail.com";

$mail_check=mail($mailto,$subject, $message, $headers,'-f'.$returnaddress);
antioch1st is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to php handling bad mail adresses AKA "bounce back emails"
 

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.39325 seconds with 12 queries