nadeemshafi9 Posted February 10, 2009 Share Posted February 10, 2009 Hello I am trying to set extra headers for the email in order to set a return-path for bounces, i am using pear mail mime and its working wonderfully but i cant seem to set this header, when i look at the code of the email when it arrives the return-path header is at default, [email protected] which i would like to change. my code follows the instruction http://pear.php.net/package/Mail_Mime/docs/latest/Mail_Mime/Mail_mime.html#methodheaders array &headers( [array $xtra_headers = null], [bool $overwrite = false]) Parameters: array $xtra_headers — Assoc array with any extra headers. Optional. bool $overwrite — Overwrite already existing headers. <?php // Body $body = $this_mail_mime->get(); // Extra Headers $extra_headers['return-path'] = '[email protected]'; // Headers $headers = $this_mail_mime->headers($extra_headers, true); ?> Thanks Link to comment https://forums.phpfreaks.com/topic/144600-solved-pear-mail_mime-extra-headers-help/ Share on other sites More sharing options...
printf Posted February 10, 2009 Share Posted February 10, 2009 Something like... <?php // include pear mail $return_email = '[email protected]'; $mail = Mail::factory ( 'mail', array( 'Return-Path' => '-f ' . $return_email ) ); // the rest of your mail junk here ?> Link to comment https://forums.phpfreaks.com/topic/144600-solved-pear-mail_mime-extra-headers-help/#findComment-758818 Share on other sites More sharing options...
nadeemshafi9 Posted February 10, 2009 Author Share Posted February 10, 2009 grate thanks a caught all the bounce backs wow, can you add two emails to it im gonna try, thanks again printf Link to comment https://forums.phpfreaks.com/topic/144600-solved-pear-mail_mime-extra-headers-help/#findComment-758829 Share on other sites More sharing options...
nadeemshafi9 Posted February 10, 2009 Author Share Posted February 10, 2009 now i have to use imap or something to read the mail box and generate a report Link to comment https://forums.phpfreaks.com/topic/144600-solved-pear-mail_mime-extra-headers-help/#findComment-758831 Share on other sites More sharing options...
nadeemshafi9 Posted February 10, 2009 Author Share Posted February 10, 2009 im thinking an ajaxian read of the mailbox that will auto update every second as the bounces come in Link to comment https://forums.phpfreaks.com/topic/144600-solved-pear-mail_mime-extra-headers-help/#findComment-758852 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.