php - Sending emails with mailgun and Laravel -


i trying learn how send emails using mailgun in laravel. when try send email timeout says: maximum execution time of 60 seconds exceeded application times out here:

$line = fgets($this->_out); 

i have route activates when click button on email page:

route::post('/email', 'maincontroller@sendemail'); 

here controller function (replaced email privacy reasons):

    public function sendemail() {         $data = [             'title'=>'email'         ];         mail::send('emails.hello', $data, function($message) {             $message->from('example@gmail.com', 'example person');             $message->to('example@gmail.com')->subject('we made it');         });         return redirect::to('/');     } 

any ideas on may doing wrong?

sending emails through mailgun not simpler, add api package, publish , update config , use custom facade send them (changing mail::send() mailgun::send())

you can find package here: http://packalyst.com/packages/package/vtalbot/mailgun

i know doesn't address error getting (would need more information that), using package simplify whole thing!


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -