mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
commit
8a533e59d9
@ -60,13 +60,15 @@ class GmailTransport extends Transport
|
||||
$this->gmail->cc($message->getCc());
|
||||
$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");
|
||||
// nlog($child);
|
||||
// $this->gmail->attach($child);
|
||||
// } //todo this should 'just work'
|
||||
|
||||
} //todo this should 'just work'
|
||||
|
||||
$this->gmail->send();
|
||||
|
||||
|
@ -11,7 +11,7 @@ class GmailTransportManager extends MailManager
|
||||
{
|
||||
protected function createGmailTransport()
|
||||
{
|
||||
info('ping pong');
|
||||
|
||||
$token = $this->app['config']->get('services.gmail.token', []);
|
||||
$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*/
|
||||
App::forgetInstance('translator');
|
||||
App::forgetInstance('mail.manager'); //singletons must be destroyed!
|
||||
|
||||
/* Inject custom translations if any exist */
|
||||
Lang::replace(Ninja::transformTranslations($this->settings));
|
||||
|
@ -20,7 +20,7 @@ class MailServiceProvider extends MailProvider
|
||||
return new GmailTransportManager($app);
|
||||
});
|
||||
|
||||
// Copied from Illuminate\Mail\MailServiceProvider
|
||||
|
||||
$this->app->bind('mailer', function ($app) {
|
||||
return $app->make('mail.manager')->mailer();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user