Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8382761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:00:08+00:00 2026-06-09T17:00:08+00:00

I am trying to attach one file and send few echo messages in the

  • 0

I am trying to attach one file and send few echo messages in the Body of an email using mailx and uuencode. I have below command which I have added them together, and uuencode doesn’t work properly but I get echo message properly in my email.

How can I make uuencode works here? Something wrong I am doing here I guess while combing uuencode with mailx?

(uuencode /tmp/chart.html percentage_graph.html) | mailx -s "LIP Data Quality Report for $DATE_YEST_FORMAT1" -r rj@host.com rj@host.com <<EOF
Data Successfully loaded into LIP_DATA_QUALITY table

Total Items Purchased: `echo $QUERY1 | awk '{print $1}'`

Total Items MissingorMismatch: `echo $QUERY1 | awk '{print $2}'`

Error Percentage: $QUERY2
EOF

But for testing purpose if I issue below command to see whether I am getting any html file or not in an attachment, then I get an email with the attachment properly.

(uuencode /tmp/chart.html percentage_graph.html) | mailx -s "LIP Data Quality Report for $DATE_YEST_FORMAT1" -r rj@host.com rj@host.com

Then what’s wrong in my first command when I combine them together?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:00:10+00:00Added an answer on June 9, 2026 at 5:00 pm

    The mailx command can get its input from the pipe (uuencode) or the heredoc (<< EOF). But not both.

    This may work for you:

    $ mailx -s "LIP Data Quality Report for $DATE_YEST_FORMAT1" -r rj@example.com rj@example.com <<EOF
    Data Successfully loaded into LIP_DATA_QUALITY table
    
    Total Items Purchased: `echo $QUERY1 | awk '{print $1}'`
    
    Total Items MissingorMismatch: `echo $QUERY1 | awk '{print $2}'`
    
    Error Percentage: $QUERY2
    
    $(uuencode /tmp/chart.html percentage_graph.html)
    
    EOF
    

    Alternately, consider using something like mutt which will let you attach files separately from the body of the message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question related to this one : I'm trying to attach an
I am trying to attach a word file from one of the folders in
I am trying to attach my mdf files to SQL server (using windows XP)
I'm trying to send pdf attachments in one of my rails applications, but the
Some users are getting an error message when trying to attach a file to
I've got a project where I'm using a PDF generator to send a file
I'm trying to send email with attachments to more then hundred people at once,
I am trying to insert multiple images in one editText. I have used following
I'm trying to combine multiple, smaller XML files into one large XML. I have
I have a page with several forms. I am trying to submit one of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.