send method CDONTS.NewMail

V

vasanth kumar

I am running the following script for sending e-mail thro web

Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = "(e-mail address removed)"
objCDOMail.To = "(e-mail address removed)"
objCDOMail.Subject = "Library books"
objCDOMail.BodyFormat = 0
objCDOMail.MailFormat = 0
objCDOMail.Body = "hi"
objCDOMail.Send
Set objCDOMail = Nothing
-------------------------
I get the following error, when I call send method of CDONTS.NewMail object
---------------------
Microsoft VBScript runtime error '800a0046'
Permission denied

/cae/library/issueupdate.asp, line 61

----------------------------

I tried both the following. Everything looks fine. My OS is windows200
server

http://support.microsoft.com/default.aspx?scid=kb;en-us;286301

http://support.microsoft.com/default.aspx?scid=kb;en-us;197619

Can somebody give a clue, what is going wrong

Any help is appreciated

-Vasanth
 
D

dlbjr

Check User Rights in the SMTP Virtual Server in IIS.
I would suggest using CDO instead of CDONTS.


Set objCDOMail = CreateObject("CDO.Message")
objCDOMail.From = "(e-mail address removed)"
objCDOMail.To = "(e-mail address removed)"
objCDOMail.Subject = "Library books"
objCDOMail.BodyFormat = 0
objCDOMail.MailFormat = 0
objCDOMail.Body = "hi"
objCDOMail.Send
Set objCDOMail = Nothing


dlbjr
Pleading sagacious indoctrination!
 
V

vasanth kumar

Only administrators have permissions for SMTP Virtual Server in IIS. Who
else should have?
 
V

vasanth kumar

now I get the following error. when I call send method
----------------------------------------------
CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid.

/cae/library/cdomail.asp, line 31
 
V

vasanth kumar

I disabled Anonymous Access for my webfolder.
I gave Authentication as Basic Authentication.
users login to this folder and update data. here I am running a script for
sending a mail.
The logged user does not have modify/write permission to the
inetpub/wwwrot/mailroot/pickup folder.
so my script is failing(as Permisson Denied") when I call send method of
CDONTS.NewMail object.
I gave modify permissions to all the users of this tool for
inetpub/wwwrot/mailroot/pickup folder.
then my script is successful.

Is this right way? How do people handle this kind of situation.
is there any danger in doing the above step?

Any suggestion appreciated

Regards,
Vasanth
 
A

Aaron [SQL Server MVP]

ASP.Net has its own SMTP solution (which may use CDO behind the scenes, I'm
not sure... but the code you will use is certainly a re-write). Please
follow up in a .NET newsgroup for more information.

--
http://www.aspfaq.com/
(Reverse address to reply.)
 

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

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top