This topic is READ ONLY
import-bot (20211) [Avatar] Offline
#1
[Originally posted by yannick]

I am trying to send attachments with SMTP. I am using code that is based on
test_smtp application in Chapter 15. There must be a way to specify what
files to attach, but I can't find any documentation or examples on this.

Also, has anyone used ASP Mailer? I am trying to find out more about this and
what I need to get it working. I seems that you can use this to send emails
with attachements from a form in a web page.

As usual, any help is appreciated.
Yannick
import-bot (20211) [Avatar] Offline
#2
Re: Attachments with SMTP
[Originally posted by ezad1]

> I am trying to send attachments with SMTP. I am using code that is based on
> test_smtp application in Chapter 15. There must be a way to specify what
> files to attach, but I can't find any documentation or examples on this.
>
> Also, has anyone used ASP Mailer? I am trying to find out more about this and
> what I need to get it working. I seems that you can use this to send emails
> with attachements from a form in a web page.
>
> As usual, any help is appreciated.
> Yannick

I haven't used the ASP mailer. Here's my answer to a similiar question about
attachments:

I don't know the details but the information you need is in RFC 1521, included
in the chapter folder. I think the idea is to include a content type header
that specifies the type of data in the attachment (e.g.
application/octet-stream). Then there is the encoding for the data (e.g. base
64). The text mail message follows the headers, as usual but is terminated by
a "start of attachment" line. What follows is the encoded bytes of the
attachment.

Sorry I can't be specific on this but as I said, I never did it. It shouldn't
be that hard -- the worst part will be encoding the data in powerscript.