mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
8a533e59d9
@ -60,13 +60,15 @@ class GmailTransport extends Transport
|
|||||||
$this->gmail->cc($message->getCc());
|
$this->gmail->cc($message->getCc());
|
||||||
$this->gmail->bcc($message->getBcc());
|
$this->gmail->bcc($message->getBcc());
|
||||||
|
|
||||||
nlog($message->getChildren());
|
foreach ($message->getChildren() as $child) {
|
||||||
|
nlog("trying to attach");
|
||||||
|
nlog($child->getContentType());
|
||||||
|
|
||||||
|
if($child->getContentType() == 'multipart/related')
|
||||||
|
$this->gmail->attach($child);
|
||||||
|
|
||||||
// foreach ($message->getChildren() as $child) {
|
|
||||||
// nlog("trying to attach");
|
} //todo this should 'just work'
|
||||||
// nlog($child);
|
|
||||||
// $this->gmail->attach($child);
|
|
||||||
// } //todo this should 'just work'
|
|
||||||
|
|
||||||
$this->gmail->send();
|
$this->gmail->send();
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ class GmailTransportManager extends MailManager
|
|||||||
{
|
{
|
||||||
protected function createGmailTransport()
|
protected function createGmailTransport()
|
||||||
{
|
{
|
||||||
info('ping pong');
|
|
||||||
$token = $this->app['config']->get('services.gmail.token', []);
|
$token = $this->app['config']->get('services.gmail.token', []);
|
||||||
$mail = new Mail;
|
$mail = new Mail;
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ class BaseMailerJob implements ShouldQueue
|
|||||||
{
|
{
|
||||||
/* Singletons need to be rebooted each time just in case our Locale is changing*/
|
/* Singletons need to be rebooted each time just in case our Locale is changing*/
|
||||||
App::forgetInstance('translator');
|
App::forgetInstance('translator');
|
||||||
|
App::forgetInstance('mail.manager'); //singletons must be destroyed!
|
||||||
|
|
||||||
/* Inject custom translations if any exist */
|
/* Inject custom translations if any exist */
|
||||||
Lang::replace(Ninja::transformTranslations($this->settings));
|
Lang::replace(Ninja::transformTranslations($this->settings));
|
||||||
|
@ -20,7 +20,7 @@ class MailServiceProvider extends MailProvider
|
|||||||
return new GmailTransportManager($app);
|
return new GmailTransportManager($app);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Copied from Illuminate\Mail\MailServiceProvider
|
|
||||||
$this->app->bind('mailer', function ($app) {
|
$this->app->bind('mailer', function ($app) {
|
||||||
return $app->make('mail.manager')->mailer();
|
return $app->make('mail.manager')->mailer();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user