commit 7a1e6e2a775b51863f300b17a909094ecde9ec4e Author: smarcet Date: Mon Oct 12 11:47:43 2020 -0300 Updated welcome emails * added emails templates for OSF will we integrate with mail microservice Change-Id: I6b94c0253e82b3434e60157fb63b5d7f99c13412 Signed-off-by: smarcet diff --git a/app/Mail/UserEmailVerificationRequest.php b/app/Mail/UserEmailVerificationRequest.php index 5a12594..b30618a 100644 --- a/app/Mail/UserEmailVerificationRequest.php +++ b/app/Mail/UserEmailVerificationRequest.php @@ -15,8 +15,8 @@ use Auth\User; use Illuminate\Bus\Queueable; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; -use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\URL; /** * Class UserEmailVerificationRequest @@ -44,6 +44,11 @@ final class UserEmailVerificationRequest extends Mailable public $user_fullname; /** + * @var string + */ + public $bio_link; + + /** * UserEmailVerificationRequest constructor. * @param User $user * @param string $verification_link @@ -53,6 +58,7 @@ final class UserEmailVerificationRequest extends Mailable $this->verification_link = $verification_link; $this->user_email = $user->getEmail(); $this->user_fullname = $user->getFullName(); + $this->bio_link = URL::action("UserController@getLogin"); } /** @@ -62,13 +68,16 @@ final class UserEmailVerificationRequest extends Mailable */ public function build() { - $subject = Config::get("mail.verification_email_subject"); - if(empty($subject)) - $subject = sprintf("%s email verification needed", Config::get('app.app_name')); + $subject = sprintf("%s email verification needed", Config::get('app.app_name')); + $view = 'emails.auth.email_verification_request'; + if(Config::get("app.tenant_name") == 'FNTECH') { + $view = 'emails.auth.email_verification_request_fn'; + $subject = sprintf("%s email verification needed", Config::get('app.app_name')); + } return $this->from(Config::get("mail.from")) ->to($this->user_email) ->subject($subject) - ->view('emails.auth.email_verification_request'); + ->view($view); } } diff --git a/app/Mail/WelcomeNewUserEmail.php b/app/Mail/WelcomeNewUserEmail.php index 3814cc5..5f55d85 100644 --- a/app/Mail/WelcomeNewUserEmail.php +++ b/app/Mail/WelcomeNewUserEmail.php @@ -54,14 +54,19 @@ final class WelcomeNewUserEmail extends Mailable */ public function build() { - $subject = Config::get("mail.welcome_new_user_email_subject"); - if (empty($subject)) + + $subject = sprintf("%s email verification needed", Config::get('app.app_name')); + $view = 'emails.welcome_new_user_email'; + + if(Config::get("app.tenant_name") == 'FNTECH') { + $view = 'emails.welcome_new_user_email_fn'; $subject = sprintf("Thank you for registering for an %s account", Config::get('app.app_name')); + } return $this->from(Config::get("mail.from")) ->to($this->user_email) ->subject($subject) - ->view('emails.welcome_new_user_email'); + ->view($view); } } diff --git a/resources/views/emails/auth/email_verification_request.blade.php b/resources/views/emails/auth/email_verification_request.blade.php index 8a1ea37..22e90b6 100644 --- a/resources/views/emails/auth/email_verification_request.blade.php +++ b/resources/views/emails/auth/email_verification_request.blade.php @@ -5,8 +5,16 @@

Dear {!!$user_fullname!!},

-

Please click the link below to verify your email address.

-

Verify Email Address.

+

+ Thank you for your interest in joining the Open Infrastructure community! In order to verify your email, + please click the verification link: Verify Email Address. +

+

+ To edit your profile just click here. You may update your photo, add a bio, and other information you wish to share. +

+

+ If you have questions or concerns, please email {!! Config::get('app.help_email') !!}. +

If you did not create an {!! Config::get('app.app_name') !!} account, no further action is required.



diff --git a/resources/views/emails/auth/email_verification_request_fn.blade.php b/resources/views/emails/auth/email_verification_request_fn.blade.php new file mode 100644 index 0000000..8a1ea37 --- /dev/null +++ b/resources/views/emails/auth/email_verification_request_fn.blade.php @@ -0,0 +1,15 @@ + + + + + + +

Dear {!!$user_fullname!!},

+

Please click the link below to verify your email address.

+

Verify Email Address.

+

If you did not create an {!! Config::get('app.app_name') !!} account, no further action is required.

+
+
+

Cheers,
Your {!! Config::get('app.tenant_name') !!} Support Team

+ + \ No newline at end of file diff --git a/resources/views/emails/welcome_new_user_email.blade.php b/resources/views/emails/welcome_new_user_email.blade.php index 43e2e2e..490738a 100644 --- a/resources/views/emails/welcome_new_user_email.blade.php +++ b/resources/views/emails/welcome_new_user_email.blade.php @@ -5,10 +5,19 @@

Dear {!!$user_fullname!!},

-

Thank you for registering for a new {!! Config::get('app.app_name') !!} account. We are glad you’re here!

-

You will use this account to access all {!! Config::get('app.tenant_name') !!} apps that require an FNid to access. Your user details are associated with your {!! Config::get('app.app_name') !!} and you are able to grant access to that information to each app at your discretion.

-

To edit your profile just click here. You may update your photo, add a bio, and other information you wish to share.

-

Should you have any questions, please email {!! Config::get('app.help_email') !!}for assistance. +

+ You will use this account to access all Open Infrastructure community apps and websites that require an {!! Config::get('app.app_name') !!}, + including the virtual Open Infrastructure Summit. Your user details are associated with your {!! Config::get('app.app_name') !!} and you + are able to grant access to that information to each app at your discretion. +

+

+ To edit your profile just click here. + You may update your photo, add a bio, and other information you wish to share. +

+

+ Should you have any questions, please email + {!! Config::get('app.help_email') !!} for assistance. +



Thanks!,
Your {!! Config::get('app.tenant_name') !!} Support Team

diff --git a/resources/views/emails/welcome_new_user_email_fn.blade.php b/resources/views/emails/welcome_new_user_email_fn.blade.php new file mode 100644 index 0000000..fa789aa --- /dev/null +++ b/resources/views/emails/welcome_new_user_email_fn.blade.php @@ -0,0 +1,16 @@ + + + + + + +

Dear {!!$user_fullname!!},

+

Thank you for registering for a new {!! Config::get('app.app_name') !!} account. We are glad you’re here!

+

You will use this account to access all {!! Config::get('app.tenant_name') !!} apps that require an {!! Config::get('app.app_name') !!} to access. Your user details are associated with your {!! Config::get('app.app_name') !!} and you are able to grant access to that information to each app at your discretion.

+

To edit your profile just click here. You may update your photo, add a bio, and other information you wish to share.

+

Should you have any questions, please email {!! Config::get('app.help_email') !!} for assistance. +
+
+

Thanks!,
Your {!! Config::get('app.tenant_name') !!} Support Team

+ + \ No newline at end of file