diff --git a/app/Mail/RecurringInvoice/ClientContactRequestCancellationObject.php b/app/Mail/RecurringInvoice/ClientContactRequestCancellationObject.php new file mode 100644 index 000000000000..7e99c939fe57 --- /dev/null +++ b/app/Mail/RecurringInvoice/ClientContactRequestCancellationObject.php @@ -0,0 +1,52 @@ +recurring_invoice = $recurring_invoice; + $this->client_contact = $client_contact; + } + + public function build() + { + + $data = [ + 'title' => ctrans('texts.new_signup'), + 'message' => ctrans('texts.new_signup_text', ['user' => $this->user->present()->name(), 'email' => $this->user->email, 'ip' => $this->user->ip]), + 'url' => config('ninja.web_url'), + 'button' => ctrans('texts.account_login'), + 'signature' => $this->company->settings->email_signature, + 'settings' => $this->company->settings, + 'logo' => $this->company->present()->logo(), + ]; + + + $mail_obj = new \stdClass; + $mail_obj->subject = ctrans('texts.new_signup'); + $mail_obj->data = $data; + $mail_obj->markdown = 'email.admin.generic'; + $mail_obj->tag = $this->company->company_key; + + return $mail_obj; + } +} \ No newline at end of file diff --git a/app/Notifications/Ninja/NewAccountCreated.php b/app/Notifications/Ninja/NewAccountCreated.php index 1367a2a5bac2..cf9fd28a488d 100644 --- a/app/Notifications/Ninja/NewAccountCreated.php +++ b/app/Notifications/Ninja/NewAccountCreated.php @@ -50,7 +50,7 @@ class NewAccountCreated extends Notification */ public function via($notifiable) { - return ['slack', 'mail']; + return ['slack']; } /** @@ -61,26 +61,6 @@ class NewAccountCreated extends Notification */ public function toMail($notifiable) { - $user_name = $this->user->first_name.' '.$this->user->last_name; - $email = $this->user->email; - $ip = $this->user->ip; - - $data = [ - 'title' => ctrans('texts.new_signup'), - 'message' => ctrans('texts.new_signup_text', ['user' => $user_name, 'email' => $email, 'ip' => $ip]), - 'url' => config('ninja.web_url'), - 'button' => ctrans('texts.account_login'), - 'signature' => $this->company->settings->email_signature, - 'logo' => $this->company->present()->logo(), - 'settings' => $this->company->settings, - ]; - - return (new MailMessage) - ->subject(ctrans('texts.new_signup')) - ->markdown('email.admin.generic', $data) - ->withSwiftMessage(function ($message) { - $message->getHeaders()->addTextHeader('Tag', $this->company->company_key); - }); } /** diff --git a/app/Notifications/Ninja/VerifyUser.php b/app/Notifications/Ninja/VerifyUser.php index 6319cfcc8033..2bd267f68f45 100644 --- a/app/Notifications/Ninja/VerifyUser.php +++ b/app/Notifications/Ninja/VerifyUser.php @@ -46,7 +46,7 @@ class VerifyUser extends Notification */ public function via($notifiable) { - return ['mail']; + return ['']; } /** @@ -57,19 +57,6 @@ class VerifyUser extends Notification */ public function toMail($notifiable) { - $data = [ - 'title' => ctrans('texts.confirmation_subject'), - 'message' => ctrans('texts.confirmation_message'), - 'url' => url("/user/confirm/{$this->user->confirmation_code}"), - 'button' => ctrans('texts.button_confirmation_message'), - 'signature' => '', - 'logo' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png', - 'settings' => $this->company->settings, - ]; - - return (new MailMessage) - ->subject(ctrans('texts.confirmation_subject')) - ->markdown('email.admin.generic', $data); } /** diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 6f6df8a58ed8..e4fb00157301 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -4138,6 +4138,9 @@ $LANG = array( ///////////////////////////////////////////////// 'start_migration' => 'Start Migration', + 'recurring_cancellation_request' => 'Request for recurring invoice cancellation from :contact', + 'recurring_cancellation_request_body' => ':contact from Client :client requested to cancel Recurring Invoice :invoice', + ); return $LANG;