ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





FAQ for the E-mail sample:


I'm running Windows 95/98/NT Workstation and I can't get it to work?

The CDONTS component is only available for Windows NT Server. It uses Microsoft's SMTP Service to send it's mail and since this is only available for Windows NT Server there would really be no point in providing CDONTS for any other platform. If you have a need to send mail and can't use CDONTS for some reason, you might want to check out:

AspEmail

It's available for free and gives you much more flexability then CDONTS.

Why am I getting an 'Invalid class string' error?

That error is almost always the result of the CDONTS object not being installed. By default it is only installed if you have installed Microsoft's SMTP service. This is due to the fact that the CDONTS.NewMail object uses the SMTP service to send it's mail so without it the object is pretty useless.

And again it's only available for NT Server so if you're trying to use it on a different web server platform you should give up now and look for a different component!

Why do I get "Microsoft VBScript runtime error '800a0046' - Permission denied" on the line that calls the send method?

This is usually the result of the IUSR_{machinename} NT account not having the appropriate permissions on the mail directories. When the mail service goes to write the file to the directory on the drive it doesn't have access and the script bombs.

You can fix this by ensuring that the account name in question has write access to the pickup directory. This is usually something like c:\inetpub\mailroot\pickup It probably wouldn't hurt to give the account access to mailroot and everything underneath.

Another possible cause of this is if you've set the application from which you're trying to send the email to run out of process.

For more info see the following Microsoft Knowledgebase Articles:
PRB: ASP Running CDONTS Applications Out of Process Fails
PRB: Permission Denied While Using CDONTS to Send Mail with Exchange

Why do I keep having trouble adding an attachment?

What's probably throwing you is the fact that the email is sent from the server and not the client. As such you can't directly include a file from the client. If you specify a server path to a file then that file will get attached to the email, but you really can't attach a file from the client since the script and mail are processed on the server side.

In order to do this you need to do one of two things... either leave the emailing to your visitors so they can attach files on their own from their mail client or allow them to upload files to the server so that you can then attach them to the email. Uploading files can be dangerous since you'll need to allow users to write files to your server and this is always a little bit risky and can be a potential security problem. To make matters worse, uploading a file is usually a more difficult task then sending the email!

Sorry folks, we don't make the rules... we just try and explain them!

Was your question not answered above?

Ask a new question

Please note: This form is only for submitting questions about the sample for us to consider including in the FAQ. If we feel the question merits inclusion, we will include it along with a reply. We will not respond to your email individually.


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers