How to use Return-Receipt-To in CI? - El Forum - 02-03-2010
[eluser]Unknown[/eluser]
Hello,
I have been working on project with CI and im using mail class but i couldn't find any example of using Return-Receipt-To with CI.. Is anybody know how it works ?
Thanks
Musti
How to use Return-Receipt-To in CI? - El Forum - 02-10-2010
[eluser]Unknown[/eluser]
Nobody? any idea?
How to use Return-Receipt-To in CI? - El Forum - 01-26-2012
[eluser]louisl[/eluser]
Necro'd this thread because I just did this and this one came top in my search...
Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter 2.1.0
*/
/*
If you send an email using Outlook, there are two optional checkboxes that can be checked:
1. Request a delivery receipt for this message.
If you check "delivery receipt", the "Return-Receipt-To" header field is added to your email. For example:
Return-Receipt-To: "User name" <[email protected]>
The delivery receipt (i.e. Return-Receipt-To) is a request for the receiving mail server to send a DSN (delivery status notification) as soon as it receives the email.
usage eg. //$this->email->set_header('Return-Receipt-To', $FromName . ' <'.$FromEmail.'>'); //delivered reciept
2. Request a read receipt for this message.
If you check "read receipt", the "Disposition-Notification-To" header field is added to your email. For example:
Disposition-Notification-To: "User name" <[email protected]>
The read receipt (i.e. Disposition-Notification-To) is a request for the receiving email client to send a DSN as soon as the person opens the email.
usage eg. //$this->email->set_header('Disposition-Notification-To', $FromName . ' <'.$FromEmail.'>'); //read receipt
Note: these are not supported by all email servers or clients.
*/
class MY_Email extends CI_Email {
public function __construct() {
parent::__construct();
}
/**
* Add a Header Item
*
* A public function to allow extra headers to be inserted.
*
* @access public
* @param string $header
* @param string $value
* @return void
*/
public function set_header($header, $value)
{
$this->_headers[$header] = $value;
}
}
// END MY_Email class
/* End of file MY_Email.php */
/* Location: ./application/libraries/MY_Email.php */
|