473,509 Members | 12,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET Send Mail - Access is denied.

Guys,

I have a Windows 2003 running Exchange 2003.

On this machine I'm trying to run an ASP.NET webform to send an e-mail.

The codebehing my ASPX is like this:
Dim NewMail As New CDO.Message
NewMail.From = From
NewMail.To = Msgto
NewMail.CC = ""
NewMail.BCC = ""
NewMail.Subject = strMsgSubject
NewMail.HTMLBody = strMsgBody
NewMail.Send()

When I run this web form the respose is

Access is denied.

I tryied with CDO and CDOEX with the same behavior.

What I'm missing?

Thanks

Nov 18 '05 #1
3 3696
Luiz:

I had the same problem with Windows 2003.

Try: dim NewMail as New System.Web.Mail.MailMessage

Everything worked when I used this rather than the older CDONTS that you are using.

Good Luck!

Fred
"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message news:ue****************@TK2MSFTNGP09.phx.gbl...
Guys,

I have a Windows 2003 running Exchange 2003.

On this machine I'm trying to run an ASP.NET webform to send an e-mail.

The codebehing my ASPX is like this:
Dim NewMail As New CDO.Message
NewMail.From = From
NewMail.To = Msgto
NewMail.CC = ""
NewMail.BCC = ""
NewMail.Subject = strMsgSubject
NewMail.HTMLBody = strMsgBody
NewMail.Send()

When I run this web form the respose is

Access is denied.

I tryied with CDO and CDOEX with the same behavior.

What I'm missing?

Thanks

Nov 18 '05 #2
Fred, thanks but

This method I'm using is the Microsoft CDO For Exchange 2000 Library...

This method You sugested, does not work too....

I thing I'm missing some user rights to InternetUser or ASP.NET Account.

Thanks anyway

Luiz
"Fred Nelson" <fr**@smartybird.com> escreveu na mensagem news:e5***************@tk2msftngp13.phx.gbl...
Luiz:

I had the same problem with Windows 2003.

Try: dim NewMail as New System.Web.Mail.MailMessage

Everything worked when I used this rather than the older CDONTS that you are using.

Good Luck!

Fred
"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message news:ue****************@TK2MSFTNGP09.phx.gbl...
Guys,

I have a Windows 2003 running Exchange 2003.

On this machine I'm trying to run an ASP.NET webform to send an e-mail.

The codebehing my ASPX is like this:
Dim NewMail As New CDO.Message
NewMail.From = From
NewMail.To = Msgto
NewMail.CC = ""
NewMail.BCC = ""
NewMail.Subject = strMsgSubject
NewMail.HTMLBody = strMsgBody
NewMail.Send()

When I run this web form the respose is

Access is denied.

I tryied with CDO and CDOEX with the same behavior.

What I'm missing?

Thanks

Nov 18 '05 #3
Hi Luiz,
You can use SMTP for email.
You will need to install SMTP Virtual Server for your IIS from the Windows CD if you don't see Default SMTP Virtual Server menu
in the IIS console.
Here is the code you will need to use :
This is in C# but you can easily convert to VB.NET
using System.Web.Mail;

MailMessage mailObj = new MailMessage();

SmtpMail.SmtpServer = "Localhost"; // put your SmtpServer name if needed.

mailObj.From =" from email address";

mailObj.To = "to email address";

mailObj.Subject = "Your mail subject.";

mailObj.BodyFormat=MailFormat.Html;

mailObj.Body="Your mail body string";

// If you have attachments 2 lines below applicable :

MailAttachment mailattach=new MailAttachment(System.IO.Path.GetFullPath(path to the file you need to upload) + "put your file name ");

mailObj.Attachments.Add(mailattach);

SmtpMail.Send(mailObj);

Hope this helps.

Regards,

Marshal Antony

..NET Developer

http://www.dotnetmarshal.com

"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message news:%2******************@TK2MSFTNGP09.phx.gbl...
Fred, thanks but

This method I'm using is the Microsoft CDO For Exchange 2000 Library...

This method You sugested, does not work too....

I thing I'm missing some user rights to InternetUser or ASP.NET Account.

Thanks anyway

Luiz
"Fred Nelson" <fr**@smartybird.com> escreveu na mensagem news:e5***************@tk2msftngp13.phx.gbl...
Luiz:

I had the same problem with Windows 2003.

Try: dim NewMail as New System.Web.Mail.MailMessage

Everything worked when I used this rather than the older CDONTS that you are using.

Good Luck!

Fred
"Luiz Vianna" <lv*****@multconnect.com.br> wrote in message news:ue****************@TK2MSFTNGP09.phx.gbl...
Guys,

I have a Windows 2003 running Exchange 2003.

On this machine I'm trying to run an ASP.NET webform to send an e-mail.

The codebehing my ASPX is like this:
Dim NewMail As New CDO.Message
NewMail.From = From
NewMail.To = Msgto
NewMail.CC = ""
NewMail.BCC = ""
NewMail.Subject = strMsgSubject
NewMail.HTMLBody = strMsgBody
NewMail.Send()

When I run this web form the respose is

Access is denied.

I tryied with CDO and CDOEX with the same behavior.

What I'm missing?

Thanks

Nov 18 '05 #4

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

Similar topics

40
11781
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the...
6
7853
by: Jon Montana | last post by:
CDONTS was working well until I installed Exchange 2000. I thought it might be a relay problem, but I allowed the server IP address to relay. Thanks for anything you can offer. here's the...
6
8124
by: vasanth kumar | last post by:
I am running the following script for sending e-mail thro web Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.From = "vkumar@ugs.com" objCDOMail.To = "vkumar@ugs.com"...
4
4316
by: CK | last post by:
Hi all, I know this question is stupid. But i need some advice for this. I am trying to develop a website, which will allow the user send to order form to the admin email. I am planning to use the...
3
3105
by: Carlos Lozano | last post by:
Hi, I know I can create e-mails and send them using System.Web.Mail, but I was wondering how can I do it using the POP3 settings on Office Outlook or Outlook Express. The problem I have is some...
0
2503
by: Erwan | last post by:
I have a strange (but very blocking) result when using the smtpmail class from an ASPX page : here is the (very simple !) code... '-------------------------------------------------- mail.To =...
2
1823
by: Terry Olsen | last post by:
I'm running on Windows Server 2003, Exchange 2003, ASP.NET (Framework 1.1) I can send mail using an email client, telnetting in to the SMTP port and manually sending the email, but when I try to...
2
3477
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
6
4467
Carrugar
by: Carrugar | last post by:
I'm running IIS 6.0 on a Win2003 server. One web page is trying to use the new CDO method of sending e-mail but generates the following error: CDO.Message.1 error '80070005' Access is denied. ...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7417
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5659
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4734
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.