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

Email specify encoding

Is it possible to specify a message to be sent with MIME encoding at time of send or by some default setting? My problem is i emailed an attachment and it is not being able to be read in yahoo email account. I'm almost positive its the encoding.
0
jerrycsakanyjr
Asked:
jerrycsakanyjr
  • 5
  • 4
  • 3
  • +1
1 Solution
 
EinarThCommented:
Are you talking about sending from the command line via the 'mail' program? In that case, I don't think mail can do mime attachments (I think it can do uuencoded attachments, but yahoo propably doesn't support that).

What you can do is to pipe the attachment part through a stand-alone mime encoder program like http://www.fpx.de/fp/Software/UUDeview/
0
 
jerrycsakanyjrAuthor Commented:
I installed the software now what would be the command to pipe the attachment...say i am sending a message with an attachment in my /home/jerry directory called test.pdf
0
 
brettmjohnsonCommented:
echo "Message body text." | uuenview -a $HOME/test.pdf  -m recipient@xyzzy.com  -f sender@me.com -s "The subject line"



0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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

To send a MIME encoded attachment
0
 
jerrycsakanyjrAuthor Commented:
Brett enstead of using echo can you pipe a cat command of a text or pcl file into the uuenview ?
0
 
brettmjohnsonCommented:
> Brett enstead of using echo can you pipe a cat command of a text or pcl file into the uuenview ?

Yes.  That is the nature of stdio pipes.  You don't have to run 'cat' through a pipe, however.
Why not just redirect input from the file?

uuenview < message.txt -a $HOME/test.pdf  -m recipient@xyzzy.com  -f sender@me.com -s "The subject line"

0
 
revantineCommented:
You can cat a file instead of echo (I know I am not Brett). Please be aware that not all email clients support uuencoded attachments.
0
 
jerrycsakanyjrAuthor Commented:
Well so far i have tested it on yahoo, optimum online,  hotmail, outlook express , incredimail and eudora and they all work so that gets the more common ones. Not sure about aol yet though. Haven't tested it.
0
 
jerrycsakanyjrAuthor Commented:
Revantine do you know of any of the ones that don't support it ?
0
 
revantineCommented:
I haven't tested recently. The lead offender that I encountered was Eudora (would not have been a current version).
0
 
revantineCommented:
I would like to know if AOL supports uuencode. They seem to have more support issues with attachments than the other tools I deal with regularly. If they do then I will update my code database and move away from mutt.

A side note, there are tools to base64 encode from commandline, but the mutt solution requires less work with multiple attachments. The example that comes to mind first is the emailing implimentation in eFax; it accepts faxes as tiff then base64 encodes and attaches if my memory serves me. Since it splits pages in to seperate tifs it would need to attach multiple files, and that part of the routine was just a shell script.
0
 
brettmjohnsonCommented:
> Please be aware that not all email clients support uuencoded attachments.

The uuenview command given above creates MIME attachments with Base64 encoding.
(uuenview's default encoding).
0
 
revantineCommented:
Thank you for following up with that brettmjohnson. I hadn't seen that use of it before.
I will check out the man page though and keep it in mind in the future. I agree, that is a better way to do it.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 5
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now