Skip to content

Instantly share code, notes, and snippets.

@zofe
Created December 11, 2015 20:08
Show Gist options
  • Save zofe/df69a082511723abfa00 to your computer and use it in GitHub Desktop.
Save zofe/df69a082511723abfa00 to your computer and use it in GitHub Desktop.
<?php
namespace App\Services;
use App\Helpers\Inliner;
class Mailer {
public static function send($view, $data, \Closure $callback) {
$eml = (new Inliner($view, $data))->convert();
\Mail::send('emails.raw',compact('eml'), $callback);
}
public static function queue($view, $data, \Closure $callback) {
$eml = (new Inliner($view, $data))->convert();
\Mail::queue('emails.raw',compact('eml'), $callback);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment