PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.sendmail > shell script to e-mail an attachment (html file)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

shell script to e-mail an attachment (html file)

Réponse
 
LinkBack Outils de la discussion
Vieux 22/09/2006, 02h01   #1
rajesh.vadde@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut shell script to e-mail an attachment (html file)

Hi all,

I need some with unix shell scripts. i am trying to e-mail a html
file as an attachment. I am using this code:

rpt_mail=xyz@abc.com
file=/home/usrid/test.htm
subject=status report

do_mail()
{
cat ${file} | mailx -s "${subject}" ${rpt_mail}
}

do_mail


The problem with the above code is i am seeing all the html tags in the
body of the e-mail. I want to see the html page in the body of the
e-mail wthout any tags. Can any one know how to do this..

Thanks alot,
Raj

  Réponse avec citation
Vieux 22/09/2006, 09h37   #2
mega
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: shell script to e-mail an attachment (html file)

rajesh.vadde@gmail.com wrote:
> Hi all,
>
> I need some with unix shell scripts. i am trying to e-mail a html
> file as an attachment. I am using this code:
>
> rpt_mail=xyz@abc.com
> file=/home/usrid/test.htm
> subject=status report
>
> do_mail()
> {
> cat ${file} | mailx -s "${subject}" ${rpt_mail}
> }
>
> do_mail
>
>
> The problem with the above code is i am seeing all the html tags in the
> body of the e-mail. I want to see the html page in the body of the
> e-mail wthout any tags. Can any one know how to do this..


You will have to mime encode your html stuff before you pipe it to mail.

cheers

Erich

  Réponse avec citation
Vieux 25/09/2006, 00h55   #3
Centurion
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: shell script to e-mail an attachment (html file)

rajesh.vadde@gmail.com wrote:
> Hi all,
>
> I need some with unix shell scripts. i am trying to e-mail a html
> file as an attachment. I am using this code:
>
> rpt_mail=xyz@abc.com
> file=/home/usrid/test.htm
> subject=status report
>
> do_mail()
> {
> cat ${file} | mailx -s "${subject}" ${rpt_mail}
> }
>
> do_mail
>
>
> The problem with the above code is i am seeing all the html tags in the
> body of the e-mail. I want to see the html page in the body of the
> e-mail wthout any tags. Can any one know how to do this..


Use "mutt" or "nail" instead of mailx if possible. Both have switches
that allow you to attach a file (as opposed to inserting it into the body).

Google is your friend.

--
James
  Réponse avec citation
Vieux 25/09/2006, 14h53   #4
Helmut Hullen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: shell script to e-mail an attachment (html file)

Hallo, Centurion,

Du (spam_this) meintest am 25.09.06:

>> do_mail()
>> {
>> cat ${file} | mailx -s "${subject}" ${rpt_mail}
>> }
>>
>> do_mail


> Use "mutt" or "nail" instead of mailx if possible. Both have
> switches that allow you to attach a file (as opposed to inserting
> it into the body).


Slackware now distributes the former "nail" as "mailx" ...

Viele Grüße!
Helmut
  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 14h47.


Édité par : vBulletin®
Copyright ©2000 - 2009, 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,36268 seconds with 12 queries