PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > How to send html mail on aix
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

How to send html mail on aix

Réponse
 
LinkBack Outils de la discussion
Vieux 18/07/2007, 09h03   #1
moonhk
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to send html mail on aix

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

  Réponse avec citation
Vieux 18/07/2007, 14h04   #2
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to send html mail on aix

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.
  Réponse avec citation
Vieux 20/07/2007, 15h37   #3
Miles
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to send html mail on aix

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

  Réponse avec citation
Vieux 20/07/2007, 15h44   #4
Miles
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to send html mail on aix

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

  Réponse avec citation
Vieux 20/07/2007, 16h17   #5
Miles
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to send html mail on aix

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

  Réponse avec citation
Vieux 16/08/2007, 03h27   #6
moonhk
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to send html mail on aix

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

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 05h11.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12519 seconds with 14 queries