Re: How do I use CDONTS.new to send an email with attachment?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jeff Cochran (jeff.nospam_at_zina.com)
Date: 10/17/04


Date: Sun, 17 Oct 2004 18:02:01 GMT

On 17 Oct 2004 09:25:18 -0700, jammer20002@yahoo.co.uk (Jammer) wrote:

>Can someone give me some sample code to use CDONTS.new to send email
>with an attachment?
>
>I've got sample code from the following website;
>
>http://msdn.microsoft.com/library/en-us/cdo/html/_denali_newmail_object_cdonts_library_.asp?frame=true
>
>But, I'm having trouble GETTING the relevant field from my HTML form!
>I can't seem to be able to get the field property. :(
>It just comes up as a blank.

This could be a problem with the form, your method of retrieving it or
the code you use.

First, stop using CDONTS and use CDO instead. See:

http://www.aspfaq.com/show.asp?id=2026

Second, are you able to send mail but not with an attachment, or not
send mail at all? Have you tried just sending messages with
attachments without pulling information from a form? You said the
field property comes up as a blank, have you tried a Response.Write to
see what is actually being processed by the form?

Post relevant code snippets for real help.

Jeff