本文整理汇总了PHP中Eccube\Application::mail方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::mail方法的具体用法?PHP Application::mail怎么用?PHP Application::mail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Eccube\Application
的用法示例。
在下文中一共展示了Application::mail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendPasswordResetCompleteMail
/**
* Send password reset notification mail.
*
* @param $Customer 会員情報
*/
public function sendPasswordResetCompleteMail(\Eccube\Entity\Customer $Customer, $password)
{
$body = $this->app->renderView('Mail/reset_complete_mail.twig', array('Customer' => $Customer, 'password' => $password));
$message = \Swift_Message::newInstance()->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ')->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))->setTo(array($Customer->getEmail()))->setBcc($this->BaseInfo->getEmail01())->setReplyTo($this->BaseInfo->getEmail03())->setReturnPath($this->BaseInfo->getEmail04())->setBody($body);
$event = new EventArgs(array('message' => $message, 'Customer' => $Customer, 'BaseInfo' => $this->BaseInfo, 'password' => $password), null);
$this->app['eccube.event.dispatcher']->dispatch(EccubeEvents::MAIL_PASSWORD_RESET_COMPLETE, $event);
$this->app->mail($message);
}
示例2: sendMail
/**
* メールを送信する
* @param array $formData メルマガ情報
* email: 送信先メールアドレス
* subject: 件名
* body:本文
*/
protected function sendMail($formData)
{
// メール送信
$message = \Swift_Message::newInstance()->setSubject($formData['subject'])->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))->setTo(array($formData['email']))->setReplyTo($this->BaseInfo->getEmail03())->setReturnPath($this->BaseInfo->getEmail04())->setBody($formData['body']);
return $this->app->mail($message);
}
示例3: sendPasswordResetCompleteMail
/**
* Send password reset notification mail.
*
* @param $Customer 会員情報
*/
public function sendPasswordResetCompleteMail(\Eccube\Entity\Customer $Customer, $password)
{
$body = $this->app->renderView('Mail/reset_complete_mail.twig', array('Customer' => $Customer, 'password' => $password));
$message = \Swift_Message::newInstance()->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ')->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))->setTo(array($Customer->getEmail()))->setBcc($this->BaseInfo->getEmail01())->setReplyTo($this->BaseInfo->getEmail03())->setReturnPath($this->BaseInfo->getEmail04())->setBody($body);
$this->app->mail($message);
}