• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

Emailing a file from the server

Our server archives every message that comes in or goes out.

Now someone needs me to provide that message so they may ...err ... CYA.

Anyway, the file has this incredible name like


(Obviously a time stamp with some other stuff at the end).

I renamed it (since trying to handle such a name is difficult at the CLI) to 144705.

How do I email this?  (Part of the message is an MS Word attachment they need).  I was horrified  to see what Outlook does to an email, so many html tags, good gosh!
On the server, I tried this:

mail james@mycompany.com -s "Your Email" </root/recovered_email/144705

But I just get the text and the attachment is all gibberish.  I tried saving the attachment and applying uudecode, but that didn't do it either.

Thanks anyone!
1 Solution
Use mutt:

echo "Please see the attached" | mutt -a /root/recovered_email/144705 -s "Your Email" james@mycompany.com

Open in new window

dougp23Author Commented:
Thanks, that did the trick!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now