Questions tagged laravel-mail

Explore the latest questions and answers asked by our top developers.

Laravel mail with attachment gives fopen(): null bytes error

I am trying to send an email with a pdf file attached to it. I checked and the file does exist at the path. I can open it aswell. I tested if i can download the file with the download function of the storage facade and that also worked. However when i try it in […]

By S Scholte
Published
Categorised as dompdf, email, laravel, laravel-mail, pdf Tagged , , , ,

How to test that a mailable was sent from a notification?

What’s the secret of testing a mailable was sent from a notification? Testing the notification: it(‘does send notification when model is deleted’, function() { Notification::fake(); $this->model->delete(); Notification::assertSentTo($this->model->user, MyModelDeletedNotification::class); }); Passes. Testing the mailable: it(‘does send email when model is deleted’, function() { Mail::fake(); $this->model->delete(); Mail::assertQueued(MyModelDeletedMail::class, 1); }); Fails. No mails queued. When a model is […]

Getting undefined property error exception when changing mail::send to mail::queue in laravel 8

Here is code that works: Mail::to($emails)->send(new ExceptionOccurred($e)); And then I change it to: Mail::to($emails)->queue(new ExceptionOccurred($e)); When I do I get the error: ErrorException: Undefined property: AppMailExceptionOccurred::$content in C:inetpubwwwrootlaravelappMailExceptionOccurred.php:33 This is ExceptionOccurred.php: namespace AppMail; use IlluminateBusQueueable; // use IlluminateContractsQueueShouldQueue; use IlluminateMailMailable; use IlluminateQueueSerializesModels; class ExceptionOccurred extends Mailable { use Queueable, SerializesModels; /** * Create a new […]

Expected response code 354 but got an empty response in laravel 8

Expected response code 354 but got an empty response Hello Developers, I have been faced with this problem for the last 2 days, I have tried a lot to solve it with a lot of resources. Going from the same error over and over again. If you know the solution please share knowledge with us. […]

By Ridoy Paul
Published
Categorised as email, laravel, laravel-8, laravel-mail, php Tagged , , , ,

Laravel attach links in email that can redirect users to a localhost project

wanted to ask a question. I have a localhost project and users are accessing the website using their own computer and my project ip address. And I have a mail.blade.php which will help me send emails to users and I want to redirect them to my application by providing an anchor link or button in […]

What is the ideal way to add custom mail actions in Laravel 8?

I am building a Laravel application, and have a specific list of tasks to be completed anytime I send an email out. Things like: Check unsubscribe list to make sure user hasn’t opted out Remove any duplicate "to" addresses If not Production, only allow sending to certain email addresses Log email to the database What […]

By scott80109
Published
Categorised as laravel, laravel-8, laravel-mail, php Tagged , , ,

How to send Laravel Mail using Outlook?

I want to send mail when user registred but i got this error. Failed to authenticate on SMTP server with username "*****" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 5.7.3 Authentication unsuccessful ". Authenticator NTLM returned Expected response code 235 but got code "535", […]

By ahmed ibrahim
Published
Categorised as laravel, laravel-mail, outlook Tagged , ,

Laravel Mail issue using nested @components with markdown

I am experiencing a problem where the code works but sometimes it fails to display the proper info in the outermost @component; the logo it shows is wrong, like if it’s caching the outermost layout and using it on the next call, but with outdated info The issue happens while sending emails, which are run […]

Mailgun API failing silently in Laravel 8.54

I’ve been trying for a full day to understand why my attempt to send mail with the Mailgun API fails silently in my Laravel 8 project. I know there are other questions here with a similar complaint, but so far none of the answers to these other questions have helped. One potential clue is that […]

By Michael Cook
Published
Categorised as laravel, laravel-mail, mailgun, php Tagged , , ,

Sending static images with markdown emails not working

Here I have an email blade template where I am loading a image from the public directory with the asset function @component(‘mail::message’) <img src={{asset(‘/logo.svg’)}} /> @endcomponent Here is the build method of my mail class public function build() { return $this ->markdown(’emails.client.information’) ->subject(‘Welcome to Walor!’); } When I preview it with a view I created […]

By nikulas13
Published
Categorised as email, laravel, laravel-mail, php Tagged , , ,
1 2 3 7

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq