CDONTS not working using other SMTP Server

M

M P

Need help! Whats wrong with my code? My plan is this, I have my IIS5.0 on
Server A and then I will use SMTP service of Server B. I already configured
IIS to use Server B as its SMTP Server but I got this error :

Microsoft VBScript runtime (0x800A0046)
Permission denied

Can you check my code:

<%
DIM sBody, sFrom, sSender, sSubject, sTo, x
sBody = "Test content body, will it work"
sFrom = "(e-mail address removed)"
sSender = "(e-mail address removed)"
sSubject = "Test"
sTo = "(e-mail address removed)"

DIM iMsg
Set iMsg = Server.CreateObject("CDONTS.NewMail")

With iMsg
.To = sTo
.From = sFrom
.Subject = sSubject
.Body = sBody
.Send
End With
%>
 
R

Ray at

Be sure that the IUSR account has permissions to write files to
\inetpub\mailroot\pickup.

Also see a couple other threads from earlier today with these subject lines:

Help! CDO.Send returns error '8004020f' -- why???

CDO.Send - does not appear to work sending to outside domains.



Also see the second paragraph here if your site is not on an NT 4 server.
http://www.aspfaq.com/show.asp?id=2026


Ray at home
 
V

Vilmar Brazão de Oliveira

HI,
If you want to use smtp from another server you need to configure the
INTELLIGENT HOST to the matching
adrees in: properties of iis 5.0 smtp server/deliver/advanced
so there you will find the option INTELLIGENT HOST to put the address to
solve your deleverings.
bye

--

««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
 
M

M P

Do i need to have SMTP Service from IIS? Or can I use other SMTP service
from other apps like MS Exchange on other machine? If yes, how ?
 
R

Ray at

You have to have SMTP installed on a server that your server can access and
is authorized to use. It doesn't have to be on your web server. My
intranet server, for example, I just have our Exchange server setup as a
smarthost. Now, that does mean that my intranet server is still using its
own smtp service, but all it's doing with the e-mails is relaying them over
to our Exchange server which then handles the message delivery.

See http://www.aspfaq.com/show.asp?id=2119 and the links in it.

Ray at work
 

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,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top