Solved

Sending E-MAIL with the attachment by single command usin mail utility

Posted on 2004-10-25
181 Views
Last Modified: 2010-04-21
Could anyone share the working example of
how to send e-mail with the attachment in Linix environment,
let's say I have to send e-mail by single command executed as part of the bash shell script.

Thanks all.
Vitali
0
Question by:vitali
    3 Comments
     
    LVL 12

    Accepted Solution

    by:
    Hi vitali,
    You can use mailx and uuencode:

    uuencode < file file | mailx -s subject someone@somewhere.org

    ...not pretty, but it works.

    Cheers!

    Stefan
    0
     
    LVL 11

    Assisted Solution

    by:avizit
    0
     
    LVL 2

    Expert Comment

    by:revantine
    echo 'message' | mutt -a file -s 'subject' recipient

    To send a MIME encoded attachment
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
    The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
    Want to pick and choose which updates you receive? Feel free to check out this quick video on how to manage your email notifications.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    856 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now