1

Simple, I am trying to queue an email using services beanstalkd and supervisord like so:

Mail::queue('emails.congratulations', $user, function($message) use($user) {
    $message->to($user['email'], $user['name'])
        ->subject('Congratulations!');
});

My supervisor program config:

[program:emailservice]
command=php /path/to/laravel/artisan queue:listen
stdout_logfile=/path/to/laravel/app/storage/logs/emailservice_supervisord.log
redirect_stderr=true

In my blade file I am trying to access an asset, an image:

<p>
    <img src="{{ asset('assets/img/logo.png') }}" />
</p>

When the email is sent and received, the image is broken and the URL to the image looks like this:

<img src="http://:/assets/img/logo.png"/>

I cannot figure out why the domain is :

If anyone else as experienced this behavior it would be good to get this out in the open because I have scoured Google and StackOverflow for answers to this issue without any mention of the issue.

A question I ask myself... when queuing, is Laravel/Supervisor/Beanstalk smart enough to remember the domain for the job?

1 Answers1

0

You have to set application url to your domain (http://localhost by default) in config/app.php.

Mustafa Akçakaya
  • 1,069
  • 2
  • 11
  • 12
  • Yeah, we have `'url' => 'http://domain.com',` but the helper function is still using '**:**'. Its not even using `http://localhost`. The URL looks like this `` – Jesse Vista Oct 09 '14 at 15:24