473,324 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Sending Mail

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

Set oMsg = Server.CreateObject("CDO.Message")
oMsg.From = "ad*****@domain.com"
oMsg.To = "ad*****@domain.com"
oMsg.Subject = "Subject"
oMsg.Body = "Body"

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

oMsg.Send
Jul 19 '05 #1
5 11016
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

"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:uj**************@TK2MSFTNGP12.phx.gbl...
Shouldn't this code do it on a Win2k3 box.

Set oMsg = Server.CreateObject("CDO.Message")
oMsg.From = "ad*****@domain.com"
oMsg.To = "ad*****@domain.com"
oMsg.Subject = "Subject"
oMsg.Body = "Body"

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

oMsg.Send

Jul 19 '05 #2
Okay how about this?

Set objMessage = Server.CreateObject("CDO.Message")
objMessage.Subject = "Test Subject"
objMessage.Sender = "us**@domain.com"
objMessage.To = "us**@domain.com"
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.


"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:eu****************@TK2MSFTNGP12.phx.gbl...
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

"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:uj**************@TK2MSFTNGP12.phx.gbl...
Shouldn't this code do it on a Win2k3 box.

Set oMsg = Server.CreateObject("CDO.Message")
oMsg.From = "ad*****@domain.com"
oMsg.To = "ad*****@domain.com"
oMsg.Subject = "Subject"
oMsg.Body = "Body"

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

oMsg.Send


Jul 19 '05 #3
IUSR needs write permissions to \inetpub\mailroot\pickup.

See www.aspfaq.com for common errors like this.

Ray at work

"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:eP**************@tk2msftngp13.phx.gbl...
Okay how about this?

Set objMessage = Server.CreateObject("CDO.Message")
objMessage.Subject = "Test Subject"
objMessage.Sender = "us**@domain.com"
objMessage.To = "us**@domain.com"
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.

Jul 19 '05 #4
"Ray at <%=sLocation%>" wrote:

...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.
Jul 19 '05 #5
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.
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:u5*************@tk2msftngp13.phx.gbl...
IUSR needs write permissions to \inetpub\mailroot\pickup.

See www.aspfaq.com for common errors like this.

Ray at work

"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:eP**************@tk2msftngp13.phx.gbl...
Okay how about this?

Set objMessage = Server.CreateObject("CDO.Message")
objMessage.Subject = "Test Subject"
objMessage.Sender = "us**@domain.com"
objMessage.To = "us**@domain.com"
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.


Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
10
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are...
2
by: Mr. x | last post by:
Hello, I am sending emails with Hebrew contents. When receiving emails - I cannot see the Hebrew characters (it is not outlook express configuration, because when receiving emails from friends -...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
3
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
by: HK | last post by:
In VB.NET, I'm getting the exception "failure sending mail". I'm running VS 2005 on XP Home. This is a new install on a new PC. I've never had email problems with VS 2003, and there I could...
3
by: mfleet1973 | last post by:
Hello Again. I have a program that sends e-mails as follows: Try Dim mail As New MailMessage mail.To = "me@comp.com" mail.From = "me@comp.com mail.Subject = "Test" mail.Body = "Testing123"
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
4
by: =?Utf-8?B?R3V5IENvaGVu?= | last post by:
Hi all I use: Dim message As New MailMessage(txtTo.Text, txtFrom.Text, txtSubject.Text, txtBody.Text) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(message) And its...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.