Jump to content

[SOLVED] PEAR Mail_mime extra headers help


nadeemshafi9

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.