- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mailx, sendmail html
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2003 01:32 PM
тАО03-17-2003 01:32 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2003 01:53 PM
тАО03-17-2003 01:53 PM
SolutionContent-Type: text/html
Look at the attached example.
The from and subject are optional.
Then
cat file.html | sendmail whoever@wherever.com
and it will get to your outlook 2000 client with the html inside of the body.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2003 01:58 PM
тАО03-17-2003 01:58 PM
Re: mailx, sendmail html
This is a tested, production script.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2003 07:56 AM
тАО03-18-2003 07:56 AM
Re: mailx, sendmail html
# Make the message header file
echo "Subject: This is my subject" > header.tmp
echo "Mime-Version: 1.0" >> header.tmp
echo "Content-Type: text/html; charset=usascii" >> header.tmp
echo >> header.tmp
# Cat the header and message file into sendmail and send it
cat header.tmp message.html | /usr/sbin/sendmail whomever@whereever.org
rm header.tmp
Looking at the script Steven posted, it seems that I could do without the MIME part, since there's no MIME encoding. Steven's script looks more full-service than the above, but I thought I'd post this because it's simple.
Steven, where does the HTML message get its content type set in your script? I see the multi-part divider, but I thought that each section needed to have its type defined within the section (this is from memory, so please forgive me if I'm wrong).
Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2003 08:19 AM
тАО03-18-2003 08:19 AM
Re: mailx, sendmail html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2003 09:45 AM
тАО03-18-2003 09:45 AM
Re: mailx, sendmail html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2003 09:55 AM
тАО03-18-2003 09:55 AM
Re: mailx, sendmail html
uuencode index.html index.html | mailx -s "your subject" whoever@wherever.com
your index.html file does not have to have the Content-Type: text/html.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2003 10:29 AM
тАО03-18-2003 10:29 AM
Re: mailx, sendmail html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2003 11:27 AM
тАО03-18-2003 11:27 AM
Re: mailx, sendmail html
Mailx clobbers whaterver you try to do to make it not just be a text message, so I think you're going to be stuck with the sendmail method.
Do some experimentation. I sent many messages to myself and examined the actual message text (not the rendered version) to see what was happening.
Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-18-2003 11:43 AM
тАО03-18-2003 11:43 AM
Re: mailx, sendmail html
yes it does send it as an attachment but the attachment is also in the body of the email if you open the email and not just look at it through the preview window.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2006 01:09 AM
тАО02-25-2006 01:09 AM
Re: mailx, sendmail html
# create mail
echo "To: $EMAIL_TO" > ${tmpmail}
echo "From: $EMAIL_FROM" >> ${tmpmail}
echo "Cc: ${EMAIL_CC} ${EMAIL_BCC}" >> ${tmpmail}
echo "Bcc: $EMAIL_BCC" >> ${tmpmail}
echo "Subject: $EMAIL_SUBJECT" >> ${tmpmail}
Anyone got an idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2006 09:28 PM
тАО02-25-2006 09:28 PM
Re: mailx, sendmail html
Create a file .mailrc in your $HOME directory and add the following variables (recognized by mailx) to it...
set charset=us-ascii
set encoding=8bit
...then mailx your html file in the body of the message.
hope it helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 07:20 PM
тАО02-26-2006 07:20 PM
Re: mailx, sendmail html
I'm using "sendmail -t" to send the emails.
echo "To: $EMAIL_TO" > ${tmpmail}
echo "From: $EMAIL_FROM" >> ${tmpmail}
echo "Cc: ${EMAIL_CC} >> ${tmpmail}
echo "Bcc: $EMAIL_BCC" >> ${tmpmail}
echo "Subject: $EMAIL_SUBJECT" >> ${tmpmail}
uuencode ${tmpbody} ${tmpbody} >> ${tmpmail}
cat ${tmpmail}| sendmail -t
Mail is received by the "To:" address, subject and body are OK. Only problem is that the "Cc:" (and "Bcc:") don't receive an email. I can't find the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2006 07:38 PM
тАО02-26-2006 07:38 PM
Re: mailx, sendmail html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-27-2006 12:35 AM
тАО02-27-2006 12:35 AM