I am trying to process a scanned message and send it to the responsible system administrator.
I am using the CakePHP email component to send a message. On the server side, I use postfix to carry the message.
function sendAsEmail($data) {
$Email->sendAs = 'html';
$Email->from = $user['Sender']['username'] . '@example.com';
$Email->return = Configure::read('App.systemAdminEmail');
$Email->bcc = array($data['Message']['recipient_text']);
$content = 'Some content';
$Email->send($content);
}
As you can see above, I set $ Email-> return to sysadmin email, which will send all the bounce.
In the postfix configuration, I tried to create the bounce.cf template and set bounce_template_file. http://www.howtoforge.com/configure-custom-postfix-bounce-messages
How to receive a scanned message and send it to the system administrator?