-
Notifications
You must be signed in to change notification settings - Fork 653
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #403 from k-yamamura/front_shopping
メール送信情報の修正
- Loading branch information
Showing
6 changed files
with
67 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,9 +30,14 @@ class MailService | |
/** @var \Eccube\Application */ | ||
public $app; | ||
|
||
|
||
/** @var \Eccube\Entity\BaseInfo */ | ||
public $BaseInfo; | ||
|
||
public function __construct(Application $app) | ||
{ | ||
$this->app = $app; | ||
$this->BaseInfo = $app['eccube.repository.base_info']->get(); | ||
} | ||
|
||
|
||
|
@@ -51,10 +56,12 @@ public function sendCustomerConfirmMail(\Eccube\Entity\Customer $Customer, $acti | |
)); | ||
|
||
$message = \Swift_Message::newInstance() | ||
->setSubject('[EC-CUBE3] 会員登録のご確認') | ||
->setFrom(array('[email protected]')) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認') | ||
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) | ||
->setTo(array($Customer->getEmail())) | ||
->setBcc($this->app['config']['mail_cc']) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($body); | ||
|
||
$this->app->mail($message); | ||
|
@@ -75,13 +82,16 @@ public function sendCustomerCompleteMail(\Eccube\Entity\Customer $Customer) | |
)); | ||
|
||
$message = \Swift_Message::newInstance() | ||
->setSubject('[EC-CUBE3] 会員登録が完了しました。') | ||
->setFrom(array('[email protected]')) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録が完了しました。') | ||
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) | ||
->setTo(array($Customer->getEmail())) | ||
->setBcc($this->app['config']['mail_cc']) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($body); | ||
|
||
$this->app->mail($message); | ||
|
||
} | ||
|
||
|
||
|
@@ -90,22 +100,23 @@ public function sendCustomerCompleteMail(\Eccube\Entity\Customer $Customer) | |
* Send withdraw mail. | ||
* | ||
* @param $Customer 会員情報 | ||
* @param $BaseInfo baseinfo | ||
* @param $email 会員email | ||
*/ | ||
public function sendCustomerWithdrawMail(\Eccube\Entity\Customer $Customer, \Eccube\Entity\BaseInfo $BaseInfo, $email) | ||
public function sendCustomerWithdrawMail(\Eccube\Entity\Customer $Customer, $email) | ||
{ | ||
|
||
$body = $this->app->renderView('Mail/customer_withdraw_mail.twig', array( | ||
'Customer' => $Customer, | ||
'BaseInfo' => $BaseInfo, | ||
'BaseInfo' => $this->BaseInfo, | ||
)); | ||
|
||
$message = \Swift_Message::newInstance() | ||
->setSubject('[EC-CUBE3] 退会手続きのご完了') | ||
->setFrom(array('[email protected]')) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . '] 退会手続きのご完了') | ||
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) | ||
->setTo(array($email)) | ||
->setBcc($this->app['config']['mail_cc']) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($body); | ||
|
||
$this->app->mail($message); | ||
|
@@ -123,19 +134,12 @@ public function sendrContactMail($formData) | |
|
||
// 問い合わせ者にメール送信 | ||
$message = \Swift_Message::newInstance() | ||
->setSubject('[EC-CUBE3] お問い合わせを受け付けました。') | ||
->setFrom(array('[email protected]')) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . '] お問い合わせを受け付けました。') | ||
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) | ||
->setTo(array($formData['email'])) | ||
->setBcc($this->app['config']['mail_cc']) | ||
->setBody($formData['contents']); | ||
|
||
$this->app->mail($message); | ||
|
||
// 管理者へメール送信 | ||
$message = \Swift_Message::newInstance() | ||
->setSubject('[EC-CUBE3] お問い合わせがあります。') | ||
->setFrom(array('[email protected]')) | ||
->setTo($this->app['config']['mail_cc']) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($formData['contents']); | ||
|
||
$this->app->mail($message); | ||
|
@@ -156,10 +160,12 @@ public function sendOrderMail(\Eccube\Entity\Order $Order) | |
)); | ||
|
||
$message = \Swift_Message::newInstance() | ||
->setSubject('[EC-CUBE3] 購入が完了しました。') | ||
->setFrom(array('[email protected]')) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . '] 購入が完了しました。') | ||
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) | ||
->setTo(array($Order->getEmail())) | ||
->setBcc($this->app['config']['mail_cc']) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($body); | ||
|
||
$this->app->mail($message); | ||
|
@@ -171,10 +177,9 @@ public function sendOrderMail(\Eccube\Entity\Order $Order) | |
* Send admin customer confirm mail. | ||
* | ||
* @param $Customer 会員情報 | ||
* @param $BaseInfo baseinfo | ||
* @param $activateUrl アクティベート用url | ||
*/ | ||
public function sendAdminCustomerConfirmMail(\Eccube\Entity\Customer $Customer, \Eccube\Entity\BaseInfo $BaseInfo, $activateUrl) | ||
public function sendAdminCustomerConfirmMail(\Eccube\Entity\Customer $Customer, $activateUrl) | ||
{ | ||
|
||
$body = $this->app->renderView('Mail/entry_confirm.twig', array( | ||
|
@@ -183,12 +188,12 @@ public function sendAdminCustomerConfirmMail(\Eccube\Entity\Customer $Customer, | |
)); | ||
|
||
$message = \Swift_Message::newInstance() | ||
->setSubject('会員登録のご確認') | ||
->setFrom(array($BaseInfo->getEmail03() => $BaseInfo->getShopName())) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . '] 会員登録のご確認') | ||
->setFrom(array($this->BaseInfo->getEmail03() => $this->BaseInfo->getShopName())) | ||
->setTo(array($Customer->getEmail())) | ||
->setBcc($BaseInfo->getEmail01()) | ||
->setReplyTo($BaseInfo->getEmail03()) | ||
->setReturnPath($BaseInfo->getEmail04()) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($body); | ||
|
||
$this->app->mail($message); | ||
|
@@ -212,10 +217,12 @@ public function sendAdminOrderMail(\Eccube\Entity\Order $Order, $formData) | |
)); | ||
|
||
$message = \Swift_Message::newInstance() | ||
->setSubject($formData['subject']) | ||
->setFrom(array('[email protected]')) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . $formData['subject']) | ||
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) | ||
->setTo(array($Order->getEmail())) | ||
->setBcc($this->app['config']['mail_cc']) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($body); | ||
|
||
$this->app->mail($message); | ||
|
@@ -235,13 +242,16 @@ public function sendPasswordResetNotificationMail(\Eccube\Entity\Customer $Custo | |
)); | ||
|
||
$message = \Swift_Message::newInstance() | ||
->setSubject('[EC-CUBE3] パスワード変更の確認') | ||
->setFrom(array('[email protected]')) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更の確認') | ||
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) | ||
->setTo(array($Customer->getEmail())) | ||
->setBcc($this->app['config']['mail_cc']) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($body); | ||
|
||
$this->app->mail($message); | ||
|
||
} | ||
|
||
/** | ||
|
@@ -257,13 +267,16 @@ public function sendPasswordResetCompleteMail(\Eccube\Entity\Customer $Customer, | |
)); | ||
|
||
$message = \Swift_Message::newInstance() | ||
->setSubject('[EC-CUBE3] パスワード変更のお知らせ') | ||
->setFrom(array('[email protected]')) | ||
->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ') | ||
->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName())) | ||
->setTo(array($Customer->getEmail())) | ||
->setBcc($this->app['config']['mail_cc']) | ||
->setBcc($this->BaseInfo->getEmail01()) | ||
->setReplyTo($this->BaseInfo->getEmail03()) | ||
->setReturnPath($this->BaseInfo->getEmail04()) | ||
->setBody($body); | ||
|
||
$this->app->mail($message); | ||
|
||
} | ||
|
||
|
||
|