Sending Mail

S

- Steve -

Shouldn't this code do it on a Win2k3 box.

Set oMsg = Server.CreateObject("CDO.Message")
oMsg.From = "(e-mail address removed)"
oMsg.To = "(e-mail address removed)"
oMsg.Subject = "Subject"
oMsg.Body = "Body"

oMsg.BodyFormat = 1 '1=Text, 0=HTML
oMsg.MailFormat = 1 '1=Text, 0=MIME

oMsg.Send
 
R

Ray at

Well, the fact that you're asking implies you're getting an error. But to
answer your question, no. You're using CDONTS properties on CDO. Instead
of .Body use .HTMLBody or .TextBody, IIRC.

Ray at work
 
S

- Steve -

Okay how about this?

Set objMessage = Server.CreateObject("CDO.Message")
objMessage.Subject = "Test Subject"
objMessage.Sender = "(e-mail address removed)"
objMessage.To = "(e-mail address removed)"
objMessage.TextBody = "Test Body"
objMessage.Send

When I try to run that it tells me:
CDO.Message.1 error '80070005'

Access is denied.

/mail.asp, line 24



This is running on the same box as an Exchange server. Now I'm pretty sure
I need to change the permissions, but I'm not sure where.
 
D

Dave Anderson

Ray at said:
...You're using CDONTS properties on CDO. Instead
of .Body use .HTMLBody or .TextBody, IIRC.

Strangely enough, those properties work just fine, despite total lack of
documentation to support the notion that they would.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
S

- Steve -

It's either being a DC or an Exchange server that's mucking it up becuase on
a plain Windows 2003 install it works fine.

I added the approriate user permissions to the pickup directory with no
luck.

Since in production I'll be using it on a non-DC non-Exchange server I'll
finish my search here. Thanks for the help.
 

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
474,083
Messages
2,570,589
Members
47,211
Latest member
JaydenBail

Latest Threads

Top