<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Send email as HTML document in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767641#M923652</link>
    <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;You can send HTML in an email using sendmail.&lt;BR /&gt;&lt;BR /&gt;Below some code I am using myself in a few scripts to send HTML messages with a text file attached.&lt;BR /&gt;&lt;BR /&gt;The function is called like :&lt;BR /&gt;&lt;BR /&gt;func_send_mail recipient@xyz.com \path\attachement_file_name&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;&lt;BR /&gt;func_send_email()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;(&lt;BR /&gt;echo "From:&amp;lt;$LOGNAME@yourservername.yourcompany.com&amp;gt;"&lt;BR /&gt;echo "To:$1"&lt;BR /&gt;echo "MIME-Version: 1.0"&lt;BR /&gt;echo "Content-Type: multipart/mixed;"&lt;BR /&gt;echo '        boundary="PAA08673.1018277622/yourservername.yourcompany.com"'&lt;BR /&gt;echo "Subject: The file you have requested"&lt;BR /&gt;echo ""&lt;BR /&gt;echo "This is a MIME-encapsulated message"&lt;BR /&gt;echo ""&lt;BR /&gt;echo "--PAA08673.1018277622/yourservername.yourcompany.com"&lt;BR /&gt;echo "Content-Type: text/html"&lt;BR /&gt;echo ""&lt;BR /&gt;echo ""&lt;BR /&gt;echo "&lt;H1&gt;$2&lt;/H1&gt;"&lt;BR /&gt;echo "&lt;P&gt;Please find attcahed the text file you have requested&lt;/P&gt;"&lt;BR /&gt;echo "--PAA08673.1018277622/yourservername.yourcompany.com"&lt;BR /&gt;echo "Content-Type: text/plain;"&lt;BR /&gt;echo " name=\"$2\""&lt;BR /&gt;echo "Content-Transfer-Encoding: quoted-printable"&lt;BR /&gt;echo "Content-Disposition: attachment;"&lt;BR /&gt;echo " filename=\"$2\""&lt;BR /&gt;echo ""&lt;BR /&gt;cat &amp;lt; $2 &lt;BR /&gt;echo "--PAA08673.1018277622/yourservername.yourcompany.com"&lt;BR /&gt;) | sendmail -t&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;&lt;BR /&gt;Hope that will help.&lt;BR /&gt;&lt;BR /&gt;Chris.</description>
    <pubDate>Mon, 22 Jul 2002 11:08:31 GMT</pubDate>
    <dc:creator>Christophe MAILHE</dc:creator>
    <dc:date>2002-07-22T11:08:31Z</dc:date>
    <item>
      <title>Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767636#M923647</link>
      <description>I've got a process that sends an email to certain users when it completes.  I'd like to include HTML code in the text, but when the message is sent to the user, the HTML code shows up and is not interpreted by the email reader. &lt;BR /&gt;&lt;BR /&gt;The email client (Outlook 2000) can display HTML-formatted messages.&lt;BR /&gt;&lt;BR /&gt;I'm just sending a file (message.html) using mailx as follows:&lt;BR /&gt;&lt;BR /&gt;cat message.html | mailx -m -s "test" userid&lt;BR /&gt;&lt;BR /&gt;Can anyone help?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;mike</description>
      <pubDate>Thu, 18 Jul 2002 23:37:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767636#M923647</guid>
      <dc:creator>Michael Resnick</dc:creator>
      <dc:date>2002-07-18T23:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767637#M923648</link>
      <description>My first thoughts are "what happens if you leave off the -m" and "have you validated that all the required HTML tags, etc are correct in your source."  Can you copy a sample HTML email (as a file) and open with outlook to see how it goes?&lt;BR /&gt;&lt;BR /&gt;But I don't use an HTML-enabled MUA, sorry.&lt;BR /&gt;&lt;BR /&gt;--Misa</description>
      <pubDate>Thu, 18 Jul 2002 23:55:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767637#M923648</guid>
      <dc:creator>Misa</dc:creator>
      <dc:date>2002-07-18T23:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767638#M923649</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;From: abc@xyz.com&lt;BR /&gt;To: def@xyz.com&lt;BR /&gt;Subject: This is html&lt;BR /&gt;Content-Type: text/html; charset=us-ascii&lt;BR /&gt;Content-Transfer-Encoding: 7bit&lt;BR /&gt;MIME-Version: 1.0&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I integrated an expect script with the sending of html-embedded emails. No problems reading the html from Microsoft Outlook.&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 19 Jul 2002 00:01:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767638#M923649</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-07-19T00:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767639#M923650</link>
      <description>I've tried with and without the -m option. Neither seems to matter.&lt;BR /&gt;&lt;BR /&gt;The HTML file opens correctly in my browser. I'm testing with a very small file - just a few tags.&lt;BR /&gt;&lt;BR /&gt;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.</description>
      <pubDate>Fri, 19 Jul 2002 00:06:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767639#M923650</guid>
      <dc:creator>Michael Resnick</dc:creator>
      <dc:date>2002-07-19T00:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767640#M923651</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Being able to open up message.html in a browser does not mean that your mail client can interpret the e-mail body as html.&lt;BR /&gt;&lt;BR /&gt;Have you tried the following in the mail body? This works fine for me.&lt;BR /&gt;&lt;BR /&gt;From: abc@xyz.com &lt;BR /&gt;To: def@xyz.com &lt;BR /&gt;Subject: This is html &lt;BR /&gt;Content-Type: text/html; charset=us-ascii &lt;BR /&gt;Content-Transfer-Encoding: 7bit &lt;BR /&gt;MIME-Version: 1.0 &lt;BR /&gt; &lt;BR /&gt;... &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;You can test this by performing a telnet to the mail server's SMTP port:&lt;BR /&gt;&lt;BR /&gt;# telnet mail_server 25&lt;BR /&gt;mail from: abc@xyz.com&lt;BR /&gt;rcpt to: def@xyz.com&lt;BR /&gt;data&lt;BR /&gt;From: abc@xyz.com &lt;BR /&gt;To: def@xyz.com &lt;BR /&gt;Subject: This is html &lt;BR /&gt;Content-Type: text/html; charset=us-ascii &lt;BR /&gt;Content-Transfer-Encoding: 7bit &lt;BR /&gt;MIME-Version: 1.0 &lt;BR /&gt; &lt;BR /&gt;&lt;H1&gt;This is a test&lt;/H1&gt;&lt;BR /&gt; &lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Fri, 19 Jul 2002 03:08:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767640#M923651</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-07-19T03:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767641#M923652</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;You can send HTML in an email using sendmail.&lt;BR /&gt;&lt;BR /&gt;Below some code I am using myself in a few scripts to send HTML messages with a text file attached.&lt;BR /&gt;&lt;BR /&gt;The function is called like :&lt;BR /&gt;&lt;BR /&gt;func_send_mail recipient@xyz.com \path\attachement_file_name&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;&lt;BR /&gt;func_send_email()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;(&lt;BR /&gt;echo "From:&amp;lt;$LOGNAME@yourservername.yourcompany.com&amp;gt;"&lt;BR /&gt;echo "To:$1"&lt;BR /&gt;echo "MIME-Version: 1.0"&lt;BR /&gt;echo "Content-Type: multipart/mixed;"&lt;BR /&gt;echo '        boundary="PAA08673.1018277622/yourservername.yourcompany.com"'&lt;BR /&gt;echo "Subject: The file you have requested"&lt;BR /&gt;echo ""&lt;BR /&gt;echo "This is a MIME-encapsulated message"&lt;BR /&gt;echo ""&lt;BR /&gt;echo "--PAA08673.1018277622/yourservername.yourcompany.com"&lt;BR /&gt;echo "Content-Type: text/html"&lt;BR /&gt;echo ""&lt;BR /&gt;echo ""&lt;BR /&gt;echo "&lt;H1&gt;$2&lt;/H1&gt;"&lt;BR /&gt;echo "&lt;P&gt;Please find attcahed the text file you have requested&lt;/P&gt;"&lt;BR /&gt;echo "--PAA08673.1018277622/yourservername.yourcompany.com"&lt;BR /&gt;echo "Content-Type: text/plain;"&lt;BR /&gt;echo " name=\"$2\""&lt;BR /&gt;echo "Content-Transfer-Encoding: quoted-printable"&lt;BR /&gt;echo "Content-Disposition: attachment;"&lt;BR /&gt;echo " filename=\"$2\""&lt;BR /&gt;echo ""&lt;BR /&gt;cat &amp;lt; $2 &lt;BR /&gt;echo "--PAA08673.1018277622/yourservername.yourcompany.com"&lt;BR /&gt;) | sendmail -t&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;&lt;BR /&gt;Hope that will help.&lt;BR /&gt;&lt;BR /&gt;Chris.</description>
      <pubDate>Mon, 22 Jul 2002 11:08:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767641#M923652</guid>
      <dc:creator>Christophe MAILHE</dc:creator>
      <dc:date>2002-07-22T11:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767642#M923653</link>
      <description>There is an outlook setting to choose between rtf and html mail.&lt;BR /&gt;&lt;BR /&gt;Tools options mail format&lt;BR /&gt;&lt;BR /&gt;If the user doesn't want html, they'll never see html&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 15 Aug 2002 19:17:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767642#M923653</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2002-08-15T19:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767643#M923654</link>
      <description>Here is another solution;&lt;BR /&gt;Suppose you have a file named 'your_file.html'.&lt;BR /&gt;You can do the following:&lt;BR /&gt;echo "[include your_file.html text/html base64]" &amp;gt; test_file&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;elm -s 'Attachment Test' user@system &amp;lt; test_file</description>
      <pubDate>Tue, 27 May 2003 23:40:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767643#M923654</guid>
      <dc:creator>Harjit Gill</dc:creator>
      <dc:date>2003-05-27T23:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Send email as HTML document</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767644#M923655</link>
      <description>#!/usr/bin/perl -w&lt;BR /&gt;require 5.000;&lt;BR /&gt;&lt;BR /&gt;$mail="/usr/lib/sendmail -t";&lt;BR /&gt;$temp="/path_of_your_html_file.htm";&lt;BR /&gt;$users="emailaddy\@somewhere.tv";&lt;BR /&gt;$ccusers="donny\@.jekels.com";&lt;BR /&gt;$subject="What you like to spam";&lt;BR /&gt;open(MAIL, "| $mail") or die "Can not access $mail $!\n";&lt;BR /&gt;open(TEMP, "$temp") or die "Can not open $temp $!\n";&lt;BR /&gt;print MAIL "To: $users\n";&lt;BR /&gt;print MAIL "Cc: $ccusers\n";&lt;BR /&gt;print MAIL "Subject: $subject\n";&lt;BR /&gt;print MAIL "Content-Type: text/html;\n";&lt;BR /&gt;print MAIL "\tcharset=\"iso-8859-1\"\n";&lt;BR /&gt;  while (&lt;TEMP&gt;) {&lt;BR /&gt;          print MAIL;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;close (TEMP);&lt;BR /&gt;close (MAIL);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;__END__&lt;BR /&gt;&lt;BR /&gt;peace&lt;BR /&gt;donny&lt;BR /&gt;&lt;/TEMP&gt;</description>
      <pubDate>Thu, 05 Jun 2003 15:10:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-email-as-html-document/m-p/2767644#M923655</guid>
      <dc:creator>Donny Jekels</dc:creator>
      <dc:date>2003-06-05T15:10:21Z</dc:date>
    </item>
  </channel>
</rss>

