[Zope-dev] MIME Tools

Jason Spisak webmaster@mtear.com
Wed, 07 Apr 1999 10:16:31 -0400


> Michel,

Worked like a charm.  I t read fine on a Windows NT , Macintosh and Linux
workstation.  The Linux workstation changed the bgcolor, but I'm sure
that's minor mail server stuff.  Great job Michel!

All the best,

Jason Spisak
webmaster@mtear.com

-----Original Message-----

> > From: Jason Spisak [mailto:webmaster@mtear.com]
> > Sent: Tuesday, April 06, 1999 11:36 AM
> > To: zope-dev@zope.org
> > Subject: [Zope-dev] MIME Tools
> >
> >
> > I love this attatchment capability!
> > I am a mime newbie so I'm not sure how to tell the
> > mail-server that the
> > attatchment is html and then actually have it come accross that way.
> > The code below send fine, and it shows up as an /text/html mime
> > atatchment in a Netscape 4.08 browser, but the name of the attatchment
> > is "Part 1.2" and no 'body' of the mail message comes accross.  Also
> > when I view tha attatchment, it is scrambled beyond recognition.  I've
> > tried 7bit, base64 encodings.  How does this mime beast work exactly?
> >
> > <psuedo code>
> >
> > <!--#sendmail smtphost="mail.foo.com"-->
> > From:<<!--#var email_from-->>
> > Subject:<!--#var email_subject-->
> > To:<<!--#var email_to-->>
> > <!--#mime type=text/html-->
> >
> > Attatchments:
> > <!--#boundary type=text/html disposition=attatchment--><!--#var
> > "REQUEST['attatchment'].read()"--><!--#/mime-->
> > <!--#var email_body-->
> > <!--#var email_signature-->
> > <!--#/sendmail-->
> >
> > </psuedo code>
> >
>
> Try:
>
> <!--#mime type=text/plain encode=7bit-->
> <!--#var email_body-->
> <!--#var email_signature-->
> <!--#boundary type=text/html disposition=attachment
> encode=7bit--><!--#var
> "REQUEST['attachment'].read()"--><!--#/mime-->
>
> The message body should come first, it's not seperate from the mime,
> it's *part* of the mime.  Remember, sendmail, and SMTP in general, don't
> know anything about MIME, as far as mail transport is concerned, a MIME
> attachment is just part of the "message".  If you place data after the
> #/mime tag, it is undefined what a mailer will do with it, but it
> probably won't consider it part of the message that is displayed to the
> user.  My guess is most mailers will just ignore it because it isn't
> bounded at the end.
>
> The #mime tag does not currently support given attachment parts names,
> so your attchments will be given whatever name your mail wants to give
> it.  This why it is called 'Part 1.2'.  This will be a feature in the
> actual release.
>
> -Michel
>
> >
> > Thanks in advance!
> > --
> > Jason Spisak
> > webmaster@mtear.com
> >
> > _______________________________________________
> > Zope-Dev maillist  -  Zope-Dev@zope.org
> > http://www.zope.org/mailman/listinfo/zope-dev
> >
> > (For non-developer, user-level issues, use the companion list,
> > zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
> >