Guest User

Untitled

a guest
Jan 18th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Route::get('send_test_email', function(){
  2. Mail::raw('Sending emails with Mailgun and Laravel is easy!', function($message)
  3. {
  4. try {
  5. //$this->buildXMLHeader;
  6. $message->subject('Mailgun and Laravel are awesome!');
  7. $message->to('*****@gmail.com');
  8. if(count(Mail::failures()) > 0) {
  9. echo "<pre>";
  10. print_r(Mail::failures());
  11. die;
  12.  
  13. }
  14. echo "SUCCESS";exit;
  15. }
  16. catch (Exception $e) {
  17. return $e->getMessage();
  18. }
  19.  
  20. });
  21. });
  22.  
  23. MAIL_DRIVER=mailgun
  24. MAIL_HOST=localhost
  25. MAIL_PORT=25
  26. MAIL_USERNAME=null
  27. MAIL_PASSWORD=null
  28. MAIL_ENCRYPTION=null
Add Comment
Please, Sign In to add comment