How to send html mail on aix

  • Follow


Following code can send html  content on Sun Solaris. Do you know how
to apply on AIX ?

Due to AIX mailx without -t parameter.

mailx -t <<EOF
From: moonhk@pxxx.com
To: moonhk@pxxx.com
Subject: A simple html test
Mime-Version: 1.0;
Content-Type: text/html; charset="ISO-8859-1";
Content-Transfer-Encoding: 7bit;
<html>
<h2>An important link to look at!</h2>
Here's an <a
href="http://www.codestore.net/store.nsf/unid/EPSD-587VVX">important
link</a>
</html>
EOF

0
Reply moon_ils-se (53) 7/18/2007 8:03:25 AM

On Wed, 18 Jul 2007 01:03:25 -0700, moonhk 
  <moon_ils-se@yahoo.com.hk> wrote:
>
>
> Following code can send html  content on Sun Solaris. Do you know how
> to apply on AIX ?
>
> Due to AIX mailx without -t parameter.
>
My mailx doesn't have -t either. What does it do?



-- 
It may or may not be worthwhile, but it still has to be done.
0
Reply Bill 7/18/2007 1:04:56 PM


On Jul 18, 3:03 am, moonhk <moon_ils...@yahoo.com.hk> wrote:
> Following code can send html  content on Sun Solaris. Do you know how
> to apply on AIX ?
>
> Due to AIX mailx without -t parameter.
>
> mailx -t <<EOF
> From: moo...@pxxx.com
> To: moo...@pxxx.com
> Subject: A simple html test
> Mime-Version: 1.0;
> Content-Type: text/html; charset="ISO-8859-1";
> Content-Transfer-Encoding: 7bit;
> <html>
> <h2>An important link to look at!</h2>
> Here's an <a
> href="http://www.codestore.net/store.nsf/unid/EPSD-587VVX">important
> link</a>
> </html>
> EOF

I think you want sendmail -t.
I do this, exactly:

cat <<EOF >${MESSAGE_HEADER_FILE}
Mime-Version: 1.0
Content-type: text/html; charset="iso-8859-1"
From: Root
To: $NOTIFY_WHO
Subject: ${NOTIFY_TITLE}

<html>
<body>

EOF

Create the body, in another file, ie. MESSAGE_FILE, be sure to add, at
the end:

cat
<<EOF
>>${MESSAGE_FILE}
</html>
</body>
EOF


cat ${MESSAGE_HEADER_FILE} ${MESSAGE_FILE} >$EMAIL_FILE


cat ${EMAIL_FILE} | sendmail -t


Miles

0
Reply Miles 7/20/2007 2:37:33 PM

On Jul 18, 8:04 am, Bill Marcum <marcumb...@bellsouth.net> wrote:
> On Wed, 18 Jul 2007 01:03:25 -0700, moonhk  <moon_ils...@yahoo.com.hk> wrote:
>
> > Following code can send html  content on Sun Solaris. Do you know how
> > to apply on AIX ?
>
> > Due to AIX mailx without -t parameter.
>
> My mailx doesn't have -t either. What does it do?
>
> --
> It may or may not be worthwhile, but it still has to be done.

You want sendmail -t to send html mail on AIX.
Miles

0
Reply Miles 7/20/2007 2:44:08 PM

On Jul 18, 3:03 am, moonhk <moon_ils...@yahoo.com.hk> wrote:
> Following code can send html  content on Sun Solaris. Do you know how
> to apply on AIX ?
>
> Due to AIX mailx without -t parameter.
>
> mailx -t <<EOF
> From: moo...@pxxx.com
> To: moo...@pxxx.com
> Subject: A simple html test
> Mime-Version: 1.0;
> Content-Type: text/html; charset="ISO-8859-1";
> Content-Transfer-Encoding: 7bit;
> <html>
> <h2>An important link to look at!</h2>
> Here's an <a
> href="http://www.codestore.net/store.nsf/unid/EPSD-587VVX">important
> link</a>
> </html>
> EOF

Use 'sendmail -t' on AIX.
Miles

0
Reply Miles 7/20/2007 3:17:37 PM

On 7 20 ,   11 17 , Miles <my_spam_acco...@shaw.ca> wrote:
> On Jul 18, 3:03 am, moonhk <moon_ils...@yahoo.com.hk> wrote:
>
>
>
>
>
> > Following code can send html  content on Sun Solaris. Do you know how
> > to apply on AIX ?
>
> > Due to AIX mailx without -t parameter.
>
> > mailx -t <<EOF
> > From: moo...@pxxx.com
> > To: moo...@pxxx.com
> > Subject: A simple html test
> > Mime-Version: 1.0;
> > Content-Type: text/html; charset="ISO-8859-1";
> > Content-Transfer-Encoding: 7bit;
> > <html>
> > <h2>An important link to look at!</h2>
> > Here's an <a
> > href="http://www.codestore.net/store.nsf/unid/EPSD-587VVX">important
> > link</a>
> > </html>
> > EOF
>
> Use 'sendmail -t' on AIX.
> Miles-         -
>
> -         -


Well, I found how to send html with attachment
# cat body.html
From:  moonhk@xx
To:  moonhk@xx,
Subject: A simple html test
Mime-Version: 1.0;
Content-type: multipart/mixed; boundary="frontier"
--frontier
Content-Type: text/html; charset="ISO-8859-1";
Content-Transfer-Encoding: 7bit;
<html>
<h2>An important link to look at!</h2>
Here's an <a>
href="http://www.codestore.net/store.nsf/unid/EPSD-587VVX">important
link</a>
</html>
--frontier
Content-Type: text/plan; charset="ISO-8859-1";
Content-Transfer-Encoding: 7bit;

Then

#cat body.html > send.tmp
#echo "\n\n" >>  send.tmp
#uuencode top.txt file.txt >> send.tmp
#cat send.tmp  | sendmail $ME

0
Reply moonhk 8/16/2007 2:27:07 AM

5 Replies
133 Views

(page loaded in 0.083 seconds)

Similiar Articles:













7/15/2012 5:44:10 PM


Reply: