

If you don t know how to generate pdf then this tutorial is for you. In this tutorial i will generate pdf and then send it to user via mail in laravel. There are some other programs like ‘ mutt‘ and ‘ Sendmail‘ which are similar to ‘ mail‘ and can be used for the same purpose.In this brand new tutorial i am going to discuss about Laravel generate pdf and send email. Today we have seen a way to send an Email from the Linux command line along with an attachment.


To include a text file as the message body of the Email, instead of using echo for the same, you can redirect the text of a file to the command as shown below: $ mail -s "Subject of the Email" -A < mailtext.txt $ echo "Email Message Body" | mail -s "Subject of the Email" -A Send Email to Multiple Recipients To send the email to multiple recipients, simply specify the multiple Email IDs separated by a comma. Similarly, to attach a file with the mail, the argument '-A' can be used: $ echo "Email Message Body" | mail -s "Subject of the Email" -A Send an Email with a File Attachment from Terminal Sending an Email to Multiple Recipients from Command Line Sending an Email with File Attachment from Command Line This is because the ‘mail’ command reads message body input from the standard input. The syntax to send an Email using ‘mail’ is as follows: $ echo "Email Message Body" | mail -s "Subject of the Email" can see that we are using the echo command to output the message body and redirecting this output to the ‘mail’ command. This program is not available by default, and can be installed in Debian and Red Hat-based distributions using: $ sudo apt install mailutils The program ‘mail’ can be used to send an Email from the command line, along with file attachments with the Email. Sending an Email from Command Line in Linux

This Email and server will be made use of by the ‘ Mail‘ program which we will learn about today. You must have already configured your Email with SMTP in your Linux machine. In this article, we will learn how to send an email with a file attachment using the mail command in Linux. The key to becoming an advanced Linux user is to use more of the command line and less of the GUI more of the keyboard and less of the mouse! As the diaspora of Linux command-line tools grows, not only administrative but several non-administrative, in fact, crucial day-to-day tasks, are performed using the command line.
