Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

how to send a mail in html using mailx command line?

yan.f_1
Occasional Contributor

how to send a mail in html using mailx command line?

please type the detail command line!
Thank you !!!
Mr.Wrong
4 REPLIES
Satish Y
Trusted Contributor

Re: how to send a mail in html using mailx command line?

Hi,

for ex. ur file is /tmp/myfile.htm, and want to send it to user sat on m/c myhp with subject "mailing html".

/usr/bin/mailx -s "mailing html" sat@myhp < /tmp/myfile.html

Cheers...
Satish.
Difference between good and the best is only a little effort
Stefan Farrelly
Honored Contributor

Re: how to send a mail in html using mailx command line?


Depending on your mail server and mail client you may need to uuencode your html file;

uuencode XX.html XX.html | mailx -s"subject"
Im from Palmerston North, New Zealand, but somehow ended up in London...
yan.f_1
Occasional Contributor

Re: how to send a mail in html using mailx command line?

thanks Satish and Stefan Farrelly!
but why the mail i recieved is still "..." using Satish's way, and can't readable code when using Stefan Farrelly's way.
why? I need setup? or init? or config?
please teach me, thanks a lot.
Mr.Wrong
Satish Y
Trusted Contributor

Re: how to send a mail in html using mailx command line?

Hi Yan,

I forgot that u need to send in html format and given u the simple cmd. Stefan's cmd is correct, But After receiving the mail message u have to decode the program by first saving the message in a file, for example "xx.mail" and execute:
uudecode xx.mail

Cheers...
Satish.
Difference between good and the best is only a little effort