->setTo(MAIL_TO)! ->setSubject('Multipart mail sample')! ;! ! // POINT of this sample! $message->addPart(! 'This is TEXT part.',! 'text/plain'! );! $message->addPart(! '<b>This is HTML part.</b>',! 'text/html'! );
! // POINT of this sample! $smimeSigner = Swift_Signers_SMimeSigner::newInstance();! $smimeSigner->setSignCertificate(! SMIME_CERT_FILE,! [SMIME_SECRET_FILE, SMIME_SECRET_PASSPHRASE]! );! $message->attachSigner($smimeSigner);!
// store log to array! $logger = new Swift_Plugins_Loggers_ArrayLogger();! $mailer->registerPlugin(! new Swift_Plugins_LoggerPlugin($logger)! );! ! [snip] $result = $mailer->send($message);! ! // POINT of this sample! echo $logger->dump();
// All recipients are replace to $recipient.! // Except a pattern in whitelist.! $recipient = MAIL_REDIRECT_TO;! $whiteList = [WHITE_LIST_PCRE_PATTERN];! ! $mailer->registerPlugin(! new Swift_Plugins_RedirectingPlugin(! $recipient,! $whiteList! )! ); missing !
// POINT of this sample! // set email address or domain! $whiteList = [MAIL_TO];! $blackList = [MAIL_TO2];! $mailer->registerPlugin(! new FilterPlugin($whiteList, $blackList)! );
POINT of this sample! $mailer->registerPlugin(! new GoogleCampaignPlugin([! 'utm_source' => 'source',! 'utm_campaign' => 'email',! 'utm_medium' => 'email',! ])! );