mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Wind back mailmailer'
This commit is contained in:
parent
40665bb5b0
commit
9745cbed4a
@ -55,18 +55,18 @@ class Handler extends ExceptionHandler
|
||||
];
|
||||
|
||||
protected $selfHostDontReport = [
|
||||
FilePermissionsFailure::class,
|
||||
PDOException::class,
|
||||
MaxAttemptsExceededException::class,
|
||||
CommandNotFoundException::class,
|
||||
ValidationException::class,
|
||||
ModelNotFoundException::class,
|
||||
NotFoundHttpException::class,
|
||||
UnableToCreateDirectory::class,
|
||||
GuzzleHttp\Exception\ConnectException::class,
|
||||
Symfony\Component\Process\Exception\RuntimeException::class,
|
||||
InvalidArgumentException::class,
|
||||
RuntimeException::class,
|
||||
// FilePermissionsFailure::class,
|
||||
// PDOException::class,
|
||||
// MaxAttemptsExceededException::class,
|
||||
// CommandNotFoundException::class,
|
||||
// ValidationException::class,
|
||||
// ModelNotFoundException::class,
|
||||
// NotFoundHttpException::class,
|
||||
// UnableToCreateDirectory::class,
|
||||
// GuzzleHttp\Exception\ConnectException::class,
|
||||
// Symfony\Component\Process\Exception\RuntimeException::class,
|
||||
// InvalidArgumentException::class,
|
||||
// RuntimeException::class,
|
||||
];
|
||||
|
||||
protected $hostedDontReport = [
|
||||
|
@ -147,9 +147,9 @@ class EmailController extends BaseController
|
||||
if (! $invitation->contact->trashed() && $invitation->contact->email) {
|
||||
$entity_obj->service()->markSent()->save();
|
||||
|
||||
// EmailEntity::dispatch($invitation->fresh(), $invitation->company, $template, $data);
|
||||
EmailEntity::dispatch($invitation->fresh(), $invitation->company, $template, $data);
|
||||
|
||||
MailEntity::dispatch($invitation, $invitation->company->db, $mo);
|
||||
// MailEntity::dispatch($invitation, $invitation->company->db, $mo);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -138,6 +138,8 @@ class NinjaMailerJob implements ShouldQueue
|
||||
$mailer->mailgun_config($this->client_mailgun_secret, $this->client_mailgun_domain);
|
||||
}
|
||||
|
||||
nlog($this->nmo->to_user->email);
|
||||
|
||||
$mailer
|
||||
->to($this->nmo->to_user->email)
|
||||
->send($this->nmo->mailable);
|
||||
@ -393,8 +395,9 @@ class NinjaMailerJob implements ShouldQueue
|
||||
* as the Mailer
|
||||
*/
|
||||
private function setPostmarkMailer()
|
||||
{
|
||||
{nlog("configuring postmark");
|
||||
if(strlen($this->nmo->settings->postmark_secret) > 2){
|
||||
nlog($this->nmo->settings->postmark_secret);
|
||||
$this->client_postmark_secret = $this->nmo->settings->postmark_secret;
|
||||
}
|
||||
else{
|
||||
@ -406,7 +409,8 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
$sending_email = (isset($this->nmo->settings->custom_sending_email) && stripos($this->nmo->settings->custom_sending_email, "@")) ? $this->nmo->settings->custom_sending_email : $user->email;
|
||||
$sending_user = (isset($this->nmo->settings->email_from_name) && strlen($this->nmo->settings->email_from_name) > 2) ? $this->nmo->settings->email_from_name : $user->name();
|
||||
|
||||
nlog($sending_email);
|
||||
nlog($sending_user);
|
||||
$this->nmo
|
||||
->mailable
|
||||
->from($sending_email, $sending_user);
|
||||
|
@ -217,3 +217,4 @@ class InvoiceEmailEngine extends BaseEmailEngine
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
@ -94,7 +94,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
});
|
||||
|
||||
Mailer::macro('postmark_config', function (string $postmark_key) {
|
||||
|
||||
nlog($postmark_key);
|
||||
Mailer::setSymfonyTransport(app('mail.manager')->createSymfonyTransport([
|
||||
'transport' => 'postmark',
|
||||
'token' => $postmark_key
|
||||
|
@ -52,9 +52,9 @@ class SendEmail
|
||||
|
||||
$this->quote->invitations->each(function ($invitation) use ($mo){
|
||||
if (! $invitation->contact->trashed() && $invitation->contact->email) {
|
||||
// EmailEntity::dispatch($invitation, $invitation->company, $this->reminder_template);
|
||||
EmailEntity::dispatch($invitation, $invitation->company, $this->reminder_template);
|
||||
|
||||
MailEntity::dispatch($invitation, $invitation->company->db, $mo);
|
||||
// MailEntity::dispatch($invitation, $invitation->company->db, $mo);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user