user-avatar
Today is Tuesday
April 30, 2024

August 8, 2011

How to use mail command to mail the contents of the file to somebody

by viggy — Categories: FOSS, linux, programming, shell, tech — Tags: , , Leave a comment

$cat “Filename” | mail -s “subject” “mailid”

The assumption here is that you have sendmail configured in the system and the mailid that you have provided accepts mails from unknown addresses. Gmail doesnt.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>