Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am quite new to Linux. I want to use the mail utility in Linux to send mail with a file as attachment to a particular mail id. Can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2013
    Posts
    0

    Sending file as attachment using mail utility in Linux


    Hi,

    I am quite new to Linux. I want to use the mail utility in Linux to send mail with a file as attachment to a particular mail id.

    Can you please let me know how this can be achieved by giving a example command or script.

    Thanks,
    Suresh

  2. #2
    Just Joined!
    Join Date
    Sep 2012
    Location
    Nashville, TN
    Posts
    97
    try issuing the following command
    Code:
    echo "Text here will be in the body" | mail -s "Subject Text" -a filetoattach.log email@example.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •