- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Send email as HTML document
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
тАО07-18-2002 04:37 PM
тАО07-18-2002 04:37 PM
The email client (Outlook 2000) can display HTML-formatted messages.
I'm just sending a file (message.html) using mailx as follows:
cat message.html | mailx -m -s "test" userid
Can anyone help?
Thanks!
mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2002 04:55 PM
тАО07-18-2002 04:55 PM
Re: Send email as HTML document
But I don't use an HTML-enabled MUA, sorry.
--Misa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2002 05:01 PM
тАО07-18-2002 05:01 PM
Re: Send email as HTML document
You need to add the appropriate headers to allow your message to be interpreted as html i.e. add the Content-Type, Content-Transfer-Encoding and MIME-Version:
From: abc@xyz.com
To: def@xyz.com
Subject: This is html
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
...
I integrated an expect script with the sending of html-embedded emails. No problems reading the html from Microsoft Outlook.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2002 05:06 PM
тАО07-18-2002 05:06 PM
Re: Send email as HTML document
The HTML file opens correctly in my browser. I'm testing with a very small file - just a few tags.
I've also tried wrapping some mime encoding around it (see attached), but that doesn't seem to work either - Outlook keeps displaying the entire message as text and seems to ignore the mime stuff.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2002 08:08 PM
тАО07-18-2002 08:08 PM
SolutionBeing able to open up message.html in a browser does not mean that your mail client can interpret the e-mail body as html.
Have you tried the following in the mail body? This works fine for me.
From: abc@xyz.com
To: def@xyz.com
Subject: This is html
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
...
You can test this by performing a telnet to the mail server's SMTP port:
# telnet mail_server 25
mail from: abc@xyz.com
rcpt to: def@xyz.com
data
From: abc@xyz.com
To: def@xyz.com
Subject: This is html
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
This is a test
.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2002 04:08 AM
тАО07-22-2002 04:08 AM
Re: Send email as HTML document
You can send HTML in an email using sendmail.
Below some code I am using myself in a few scripts to send HTML messages with a text file attached.
The function is called like :
func_send_mail recipient@xyz.com \path\attachement_file_name
----------------------------
func_send_email()
{
(
echo "From:<$LOGNAME@yourservername.yourcompany.com>"
echo "To:$1"
echo "MIME-Version: 1.0"
echo "Content-Type: multipart/mixed;"
echo ' boundary="PAA08673.1018277622/yourservername.yourcompany.com"'
echo "Subject: The file you have requested"
echo ""
echo "This is a MIME-encapsulated message"
echo ""
echo "--PAA08673.1018277622/yourservername.yourcompany.com"
echo "Content-Type: text/html"
echo ""
echo ""
echo "
$2
"echo "
Please find attcahed the text file you have requested
"echo "--PAA08673.1018277622/yourservername.yourcompany.com"
echo "Content-Type: text/plain;"
echo " name=\"$2\""
echo "Content-Transfer-Encoding: quoted-printable"
echo "Content-Disposition: attachment;"
echo " filename=\"$2\""
echo ""
cat < $2
echo "--PAA08673.1018277622/yourservername.yourcompany.com"
) | sendmail -t
}
----------------------------
Hope that will help.
Chris.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-15-2002 12:17 PM
тАО08-15-2002 12:17 PM
Re: Send email as HTML document
Tools options mail format
If the user doesn't want html, they'll never see html
Steve
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
тАО05-27-2003 04:40 PM
тАО05-27-2003 04:40 PM
Re: Send email as HTML document
Suppose you have a file named 'your_file.html'.
You can do the following:
echo "[include your_file.html text/html base64]" > test_file
elm -s 'Attachment Test' user@system < test_file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2003 08:10 AM
тАО06-05-2003 08:10 AM
Re: Send email as HTML document
require 5.000;
$mail="/usr/lib/sendmail -t";
$temp="/path_of_your_html_file.htm";
$users="emailaddy\@somewhere.tv";
$ccusers="donny\@.jekels.com";
$subject="What you like to spam";
open(MAIL, "| $mail") or die "Can not access $mail $!\n";
open(TEMP, "$temp") or die "Can not open $temp $!\n";
print MAIL "To: $users\n";
print MAIL "Cc: $ccusers\n";
print MAIL "Subject: $subject\n";
print MAIL "Content-Type: text/html;\n";
print MAIL "\tcharset=\"iso-8859-1\"\n";
while (
print MAIL;
}
close (TEMP);
close (MAIL);
__END__
peace
donny