mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Added check for mail config settings
This commit is contained in:
parent
26e1a0df8d
commit
61f3bedc48
@ -9,6 +9,12 @@ class Mailer
|
||||
{
|
||||
public function sendTo($toEmail, $fromEmail, $fromName, $subject, $view, $data = [])
|
||||
{
|
||||
// check the username is set
|
||||
if ( ! env('POSTMARK_API_TOKEN') && ! env('MAIL_USERNAME')) {
|
||||
return trans('texts.invalid_mail_config');
|
||||
}
|
||||
|
||||
// don't send emails to dummy addresses
|
||||
if (stristr($toEmail, '@example.com')) {
|
||||
return true;
|
||||
}
|
||||
|
@ -1032,4 +1032,7 @@ return array(
|
||||
'color_font_help' => 'Note: the primary color and fonts are also used in the client portal and custom email designs.',
|
||||
|
||||
'live_preview' => 'Live Preview',
|
||||
'invalid_mail_config' => 'Unable to send email, please check that the mail settings are correct.',
|
||||
|
||||
|
||||
);
|
Loading…
Reference in New Issue
Block a user