Need ASP code for email attachments...

N

Neil Gould

Hi all,

Thanks for the suggestions for our club's initial bulkmail sending
routines. I did read up on the use of ASP vs. a separate COM app such as
ASPEmail, and determined that for our club's purposes the ASP code that
loops through the data and sends individual messages vs. BCC performs
adequately for simple messaging.

The next phase is to email the club's newsletter, which is in PDF format,
and I've run into the problem that CDO errors out because it doesn't
recognize the format using the basic config settings. In sifting through
the MSDN's CDO content and other sources I found some references that
would permit attaching .txt and .gif files, but not for PDFs. Does anyone
here know of a concise and relatively complete reference to such things as
cdoConfig settings, or better, a solution to this specific problem?

TIA,

Neil
 
A

Adrienne Boswell

Hi all,

Thanks for the suggestions for our club's initial bulkmail sending
routines. I did read up on the use of ASP vs. a separate COM app such
as ASPEmail, and determined that for our club's purposes the ASP code
that loops through the data and sends individual messages vs. BCC
performs adequately for simple messaging.

The next phase is to email the club's newsletter, which is in PDF
format, and I've run into the problem that CDO errors out because it
doesn't recognize the format using the basic config settings. In
sifting through the MSDN's CDO content and other sources I found some
references that would permit attaching .txt and .gif files, but not
for PDFs. Does anyone here know of a concise and relatively complete
reference to such things as cdoConfig settings, or better, a solution
to this specific problem?

TIA,

Neil

Your best bet is to send a plain text email with a link to the relavent
PDF file.
 
N

Neil Gould

Hi Adrienne,

Recently said:
Your best bet is to send a plain text email with a link to the
relavent PDF file.
Thanks for your thoughts... but, why do you think this is the best bet?

Regards,

Neil
 
A

Adrienne Boswell

Hi Adrienne,

Recently said:
Gazing into my crystal ball I observed "Neil Gould"
[...]

The next phase is to email the club's newsletter, which is in PDF
format, and I've run into the problem that CDO errors out because it
doesn't recognize the format using the basic config settings. In
sifting through the MSDN's CDO content and other sources I found some
references that would permit attaching .txt and .gif files, but not
for PDFs. Does anyone here know of a concise and relatively complete
reference to such things as cdoConfig settings, or better, a solution
to this specific problem?

Your best bet is to send a plain text email with a link to the
relavent PDF file.
Thanks for your thoughts... but, why do you think this is the best bet?

Regards,

Neil

Attachments take a while to download, and no other mail can be retrieved
until the entire message has been downloaded. Sending a text message
with a link to the relavent PDF file allows the user to get other mail
while going to the address specified and either opening or saving the
PDF file (Firefox has an extension to view PDF documents as HTML,
opening or saving).

I would even go so far as to say that the newsletter would be better off
done as an HTML page, much less to download, open, etc.

If you make a template, you can save the content in a database, and
serve the newsletter like any other page, including navigation, links to
other documents, etc. You can create a form for inputting the
newsletter content, and output it as HTML if you wanted to send a
multipart HTML/Plain text newsletter. You can even archive these
newsletters.
 
M

Mike Brind [MVP]

Neil Gould said:
Hi all,

Thanks for the suggestions for our club's initial bulkmail sending
routines. I did read up on the use of ASP vs. a separate COM app such as
ASPEmail, and determined that for our club's purposes the ASP code that
loops through the data and sends individual messages vs. BCC performs
adequately for simple messaging.

The next phase is to email the club's newsletter, which is in PDF format,
and I've run into the problem that CDO errors out because it doesn't
recognize the format using the basic config settings. In sifting through
the MSDN's CDO content and other sources I found some references that
would permit attaching .txt and .gif files, but not for PDFs. Does anyone
here know of a concise and relatively complete reference to such things as
cdoConfig settings, or better, a solution to this specific problem?

Have you not tried the AddAttachment method?
http://www.bellaonline.com/articles/art29374.asp
 
N

Neil Gould

Recently said:
Attachments take a while to download, and no other mail can be
retrieved until the entire message has been downloaded. Sending a
text message with a link to the relavent PDF file allows the user to
get other mail while going to the address specified and either
opening or saving the PDF file (Firefox has an extension to view PDF
documents as HTML, opening or saving).

I would even go so far as to say that the newsletter would be better
off done as an HTML page, much less to download, open, etc.

If you make a template, you can save the content in a database, and
serve the newsletter like any other page, including navigation, links
to other documents, etc. You can create a form for inputting the
newsletter content, and output it as HTML if you wanted to send a
multipart HTML/Plain text newsletter. You can even archive these
newsletters.
I see. The newsletter is available on the website, but some members prefer
to have it emailed to them, which we have done manually for the last few
years. I'm trying to automate the process. In fact, it can be done with
ASPEmail and similar COM apps, but if this task can be accomplished with
ASP code alone, that is our preference.

Best,

Neil
 
N

Neil Gould

Recently said:
OK... Tracing through this has resolved the ability to send PDFs via
ASP... so far, so good, and it's a pretty elegant method for our purposes.

What happens is that the attachment is given a generated name, e.g.
"ATT0001" rather than the name of the PDF file. I tried to find a
parameter for AddAttachments that would use the actual filename, but have
found nothing so far. Know of some way to accomplish this?

TIA,

Neil
 
N

Neil Gould

Recently said:
Hmm... I don't suspect that this is an encoding issue, as the received
attachment has the PDF extension and opens correctly as a PDF. So, it is
being transmitted correctly.

The only issue is the filename shown in the "Attachment" window of the
mail client. I haven't tested it with other than OE yet, but at any rate,
worst-case is that we can live with this limitation if it can't be solved.

Thanks for the pointer, it is a good general source of encoding info.

Best,

Neil
 
A

Anthony Jones

Neil Gould said:
http://classicasp.aspfaq.com/email/why-does-cdo-message-give-800c000d-errors.htmlOK... Tracing through this has resolved the ability to send PDFs via
ASP... so far, so good, and it's a pretty elegant method for our purposes.

What happens is that the attachment is given a generated name, e.g.
"ATT0001" rather than the name of the PDF file. I tried to find a
parameter for AddAttachments that would use the actual filename, but have
found nothing so far. Know of some way to accomplish this?

Thats strange. Usually AddAttachment will configure the Content-Disposition
header for the attachment and give it filename value matching the source
file name.

Are you including some textbody content, something to the effect "Please
find news letter attached."?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top