LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-23-2013, 01:58 AM   #1
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
How to send mails using HTML format with mailx client ?


Hello,

I have a script, scheduled in cron, sends emails at defined intervals. Those mails are comming because I had set mailx client in my script, for the same.
Code:
#!/bin/bash
.....
.....
mailx -s "sample mail" abc@example.com < infile.txt
Those mails are always in plain-text format. And I want to change it's format to HTML, so I can customize the mail content like use different fonts, font sizes, colors etc.

I tried to search & read a lot of thread on this topic, but nothing 'really' helped and I am still out of the luck.

However, if anyone has idea about this, then please share.

TIA with gratitude!
 
Old 02-23-2013, 02:04 AM   #2
descendant_command
Member
 
Registered: Mar 2012
Posts: 796

Rep: Reputation: 180Reputation: 180
Just construct infile.txt to contain the required html and structure.
Mailx only sends the body you give it, it has no effect on the content.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to send a mail in HTML format using mailx or mail or sendmail commands vishnu_knl Linux - Newbie 8 04-05-2012 10:00 AM
SVN : - some mails are coming in plain format (html coding) & some in html format deepakdeore2004 Linux - General 0 05-06-2010 01:54 AM
Linux Email client to send/recive mails from Exchange server Hussain000 Red Hat 1 01-01-2009 05:41 AM
Linux Email client to send/recive mails from Exchange server Hussain000 Linux - General 1 01-01-2009 05:39 AM
mails are not being sent in html format makalas Linux - Newbie 3 05-08-2007 06:09 AM


All times are GMT -5. The time now is 12:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration