aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php')
-rw-r--r--src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
index fa682ae7..6b108dd3 100644
--- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
+++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php
@@ -47,6 +47,13 @@ class AuthCodeMailer implements AuthCodeMailerInterface
47 private $supportUrl; 47 private $supportUrl;
48 48
49 /** 49 /**
50 * Url for the wallabag instance.
51 *
52 * @var string
53 */
54 private $wallabagUrl;
55
56 /**
50 * Initialize the auth code mailer with the SwiftMailer object. 57 * Initialize the auth code mailer with the SwiftMailer object.
51 * 58 *
52 * @param \Swift_Mailer $mailer 59 * @param \Swift_Mailer $mailer
@@ -54,14 +61,16 @@ class AuthCodeMailer implements AuthCodeMailerInterface
54 * @param string $senderEmail 61 * @param string $senderEmail
55 * @param string $senderName 62 * @param string $senderName
56 * @param string $supportUrl 63 * @param string $supportUrl
64 * @param string $wallabagUrl
57 */ 65 */
58 public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl) 66 public function __construct(\Swift_Mailer $mailer, \Twig_Environment $twig, $senderEmail, $senderName, $supportUrl, $wallabagUrl)
59 { 67 {
60 $this->mailer = $mailer; 68 $this->mailer = $mailer;
61 $this->twig = $twig; 69 $this->twig = $twig;
62 $this->senderEmail = $senderEmail; 70 $this->senderEmail = $senderEmail;
63 $this->senderName = $senderName; 71 $this->senderName = $senderName;
64 $this->supportUrl = $supportUrl; 72 $this->supportUrl = $supportUrl;
73 $this->wallabagUrl = $wallabagUrl;
65 } 74 }
66 75
67 /** 76 /**
@@ -77,12 +86,13 @@ class AuthCodeMailer implements AuthCodeMailerInterface
77 $bodyHtml = $template->renderBlock('body_html', [ 86 $bodyHtml = $template->renderBlock('body_html', [
78 'user' => $user->getName(), 87 'user' => $user->getName(),
79 'code' => $user->getEmailAuthCode(), 88 'code' => $user->getEmailAuthCode(),
80 'support' => $this->supportUrl, 89 'support_url' => $this->supportUrl,
90 'wallabag_url' => $this->wallabagUrl,
81 ]); 91 ]);
82 $bodyText = $template->renderBlock('body_text', [ 92 $bodyText = $template->renderBlock('body_text', [
83 'user' => $user->getName(), 93 'user' => $user->getName(),
84 'code' => $user->getEmailAuthCode(), 94 'code' => $user->getEmailAuthCode(),
85 'support' => $this->supportUrl, 95 'support_url' => $this->supportUrl,
86 ]); 96 ]);
87 97
88 $message = new \Swift_Message(); 98 $message = new \Swift_Message();