Ejemplo n.º 1
0
 /**
  * @param \Generated\Shared\Transfer\MailTransfer $mailTransfer
  * @param \Spryker\Zed\Payolution\PayolutionConfig $config
  *
  * @return void
  */
 protected function setMailTransferFrom(MailTransfer $mailTransfer, PayolutionConfig $config)
 {
     $fromName = $config->getEmailFromName();
     if ($fromName !== null) {
         $mailTransfer->setFromName($fromName);
     }
     $fromEmail = $config->getEmailFromAddress();
     if ($fromEmail !== null) {
         $mailTransfer->setFromEmail($fromEmail);
     }
 }
Ejemplo n.º 2
0
 /**
  * @return void
  */
 public function testSendMailContainsFromEmail()
 {
     $mailTransfer = new MailTransfer();
     $mailTransfer->setFromEmail('*****@*****.**');
     $this->mandrillMock->messages->expects($this->once())->method('sendTemplate')->with($this->anything(), $this->anything(), $this->arrayContainsKeyEqualTo('from_email', '*****@*****.**'), $this->anything(), $this->anything(), $this->anything());
     $this->mailSender->sendMail($mailTransfer);
 }
 /**
  * @param \Generated\Shared\Transfer\MailTransfer $mailTransfer
  * @param \Spryker\Zed\Newsletter\NewsletterConfig $config
  *
  * @return void
  */
 protected function setMailTransferFrom(MailTransfer $mailTransfer, NewsletterConfig $config)
 {
     $fromName = $config->getFromEmailName();
     if ($fromName !== null) {
         $mailTransfer->setFromName($fromName);
     }
     $fromEmail = $config->getFromEmailAddress();
     if ($fromEmail !== null) {
         $mailTransfer->setFromEmail($fromEmail);
     }
 }
 /**
  * @param \Generated\Shared\Transfer\MailTransfer $mailTransfer
  *
  * @return void
  */
 protected function setMailTransferFrom(MailTransfer $mailTransfer)
 {
     $fromName = $this->config->getFromEmailName();
     if ($fromName !== null) {
         $mailTransfer->setFromName($fromName);
     }
     $fromEmail = $this->config->getFromEmailAddress();
     if ($fromEmail !== null) {
         $mailTransfer->setFromEmail($fromEmail);
     }
 }