Questions tagged [laravel-mail]

Laravel provides a clean, simple API over the popular SwiftMailer library with drivers for SMTP, Mailgun, SparkPost, Amazon SES, and sendmail, allowing you to quickly get started sending mail through a local or cloud-based service of your choice.

Laravel provides drivers for SMTP, Mailgun, Mandrill, Amazon SES, PHP's mail function, and sendmail, allowing you to quickly get started sending mail through a local or cloud based service of your choice. Read more in documentation

189 questions
44
votes
2 answers

Laravel 5.3 Notification Vs Mailable

I am a little confused about whether to use Laravel's Notification or Mailable class. From what I understand, Mailables are used to send only emails whereas Notifications can be used to send emails and sms. In my application, I dont have plans to…
Neel
  • 8,044
  • 21
  • 75
  • 119
32
votes
1 answer

Laravel 5 - How Do You Catch an Mail::send() Error?

I have the following method which sends out an e-mail: Mail::send('emails.configuration_test', array(), function($email)use($request){ $email->to($request->test_address)->subject('Configuration Test'); }); If the above errors out, I'd like to…
Lloyd Banks
  • 32,108
  • 50
  • 143
  • 228
14
votes
1 answer

Laravel 5.3 - Attach Multiple Files To Mailables

How does one go about attaching multiple files to laravel 5.3 mailable? I can attach a single file easily enough using ->attach($form->filePath) on my mailable build method. However, soon as I change the form field to array I get the following…
kash101
  • 247
  • 2
  • 4
  • 11
13
votes
2 answers

Laravel 5.3 Password Broker Customization

Does anyone know how to override the functions used within laravel's password broker? I know the docs: https://laravel.com/docs/5.3/passwords#resetting-views Give information on what to do for things like views and a few surface level things but…
Andre F.
  • 1,025
  • 1
  • 8
  • 26
11
votes
1 answer

Sending a mail without creating a Mailable in Laravel 5.5

I don't see anything about sending Mail without creating a Mailable class in Laravel 5.5 documentation. I know it was possible before (5.2) but I don't remember how. Is it still possible? Is it deprecated? Is there something I missed in the…
rap-2-h
  • 23,287
  • 23
  • 130
  • 217
11
votes
2 answers

Laravel 5.4 wrongly mix HTML components in Markdown Mailable

I had ordinary Mailable that had some hardcoded content. I've published mailable views, changed content to markdown and replaced ->view with ->markdown. Now mail have nicely formated markdown. However Laravel after compiling that markdown will pick…
przemo_li
  • 3,703
  • 3
  • 31
  • 52
11
votes
8 answers

Connection could not be established with host mailtrap.io [php_network_getaddresses: getaddrinfo failed: No such host is known. #0]

I am getting below error: Connection could not be established with host smtp.gmail.com [php_network_getaddresses: getaddrinfo failed: No such host is known. 0] My .env file looks…
Alwaysalearner
  • 3,137
  • 9
  • 45
  • 85
11
votes
5 answers

Laravel 5.3 Send Notification to Users without an account

With the Laravel 5.3 Notification feature, I see that the notifications are sent to users like this: $user->notify(new InvoicePaid($invoice)); Where I believe $user is the notifiable entity. What if I want to send notifications to users who doesn't…
Neel
  • 8,044
  • 21
  • 75
  • 119
8
votes
1 answer

How does Laravel schedule mails for later sending?

The Laravel Documentation describes the ability to schedule a mail for later delivery, with the following example: $when = Carbon::now()->addMinutes(10); Mail::to($request->user()) ->cc($moreUsers) ->bcc($evenMoreUsers) ->later($when,…
miho
  • 10,856
  • 6
  • 37
  • 78
8
votes
4 answers

Laravel on Localhost - Connection could not be established with host smtp.gmail.com [Connection timed out #110]

I am trying to use Mailgun 'driver' => env('MAIL_DRIVER', 'mailgun'), 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 'port' => env('MAIL_PORT',…
LeBlaireau
  • 14,709
  • 30
  • 95
  • 169
7
votes
3 answers

Changing the default “Subject” field for verification emails in Laravel 5.7

I'm trying to change the default subject field in the verification email that comes with Laravel 5.7. How and where do I change it? I have searched all over the place and online. Because it's brand new I can't find an answer.
GabMic
  • 1,302
  • 13
  • 30
7
votes
3 answers

Laravel 5.3 How to show Username in Notifications Email

I am trying to add the user's first name in the notification emails. At the moment, Laravel notification emails starts like: Hello, And I want to change it to: Hello Donald, Right now, I have a set-up like this. This example is for a Password…
Neel
  • 8,044
  • 21
  • 75
  • 119
7
votes
1 answer

How to send Data from Laravel Controller to Mailable Class

I have created Mailable Class in Laravel 5.3 which calls the view. However, I need to pass some variables from my Controller to the Mailable Class and then use these values inside the View. This is my set-up: Controller: $mailData = array( …
Neel
  • 8,044
  • 21
  • 75
  • 119
6
votes
2 answers

Laravel 5 Mail template showing html tags

I have the main mail template (resources/views/mail.blade.php). This is a common template to use all of my mail like for forgot password or for change new password. The content for mail.blade.php is…
5
votes
1 answer

Laravel not sending mail to mailtrap inbox

I have tried using sendmail in laravel but it did not work . Check my post here Sending mails through Laravel is inconsistent So , i tried using mailtrap's fake smtp server in laravel. It's not working here too. I am on Bitnami Mamp stack 7.1.15-0,…
saurav
  • 4,032
  • 7
  • 38
  • 74
1
2 3
12 13