snowfire/Beautymail

Domain isn't set in queued job

Closed this issue · 3 comments

jhoff commented

If you use Beautymail in a queued job, Request::getSchemeAndHttpHost() returns http://localhost by default, which means all images will be broken.

See this for reference: http://stackoverflow.com/questions/28373730/getting-route-url-from-queue-returns-wrong-base

Perhaps instead of relying on Request::getSchemeAndHttpHost(), we could use an injected view variable that either uses the Request or defaults to Config::get('app.url') when it's running as a Job?

jhoff commented

Disregard. Laravel already falls back to the url in config/app.php. I just forgot to set it. :/

@jhoff How did you solve it?

jhoff commented

Set the url parameter in config/app.php