Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 16th, 2007, 10:47 PM
Authorized User
Join Date: Dec 2007
Posts: 59
Thanks: 9
Thanked 0 Times in 0 Posts
Default send email error

 I have a real problem here. I'm trying to configure a web
server which is Server 2003 with IIS and SMTP installed.
When I run my asp pages, my CDONTS object return an error
on the page which is Microsoft VBScript runtime
error '800a0046'. Permission Denied.

Please help me to send this email.
Thanks so much to your help.
Hoang Phuc

Old December 16th, 2007, 11:22 PM
Friend of Wrox
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41

The CDONTS dll is not shipped with win 2003. You need to use CDOSYS. Did you ask Goggle? Typing in 'sending ASP mail from 2003 server' prpbably tells you in the first search result. The CDOSYS code is:
Const cdoSendUsingPort = 2
Dim iMsg,iConf,Flds,strHTML,strSmartHost
StrSmartHost = "xxx.xx.xx"
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

With Flds
   .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
   .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
   .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
End With

With iMsg
   Set .Configuration = iConf
   .To = "aValidAddress@somewhere.com"
   .From = "aDifferentValidAddress@somewhere.com"
   .Subject = "Some subject"
   .HTMLBody = "Test message body"
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing


Wind is your friend

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send email abiye49 Excel VBA 1 January 10th, 2007 03:32 PM
Send by email tsimsha Classic ASP Databases 1 October 1st, 2005 03:03 AM
To send an email Danny_n BOOK: Excel 2003 VBA Programmer's Reference 0 January 12th, 2005 08:33 AM
send email X-Ken VS.NET 2002/2003 8 July 2nd, 2004 06:13 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.