Link to home
Start Free TrialLog in
Avatar of jerrycsakanyjr
jerrycsakanyjr

asked on

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.
Avatar of EinarTh
EinarTh

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/
Avatar of jerrycsakanyjr

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of brettmjohnson
brettmjohnson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
echo 'message' | mutt -a file -s 'subject' recipient

To send a MIME encoded attachment
Brett enstead of using echo can you pipe a cat command of a text or pcl file into the uuenview ?
> 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"

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.
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.
Revantine do you know of any of the ones that don't support it ?
I haven't tested recently. The lead offender that I encountered was Eudora (would not have been a current version).
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.
> 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).
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.