Email Response Processing in CakePHP and Postfix

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?

+3
1

, SMTP ( POP3) PHP. PHP- , , , , .

, CakePHP, .

. , , . VERP ( ?), , PHPEmailClient.

VERP: http://en.wikipedia.org/wiki/Variable_envelope_return_path

, : http://www.mainelydesign.com/blog/view/setting-envelope-from-header-cakephp-email-component

SwiftMailer. ; PHP SMTP-, , , . http://swiftmailer.org/

+1

Source: https://habr.com/ru/post/1752243/


All Articles