LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
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
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:56 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration