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.

CDO.Mail problems

Ben
I've having a very boggling problem and I hope someone can help shed some
light on it.

I have and Email dll for my solution. Inside the solution two projects use
the dll. An asp.net application and a c# console application. When the dll
runs in the asp.net project it sends emails no problem. In fact I can stop
the SMTP server and let the emails pile up in the pickup folder. Its'
great, I can delete them at will, turn it on and watch them send etc. Now,
the same dll used in the console application will send the email if the SMTP
server is started BUT if the SMTP server is stopped I get: Could not access
'CDO.Message' object. Failed to connect to transport.

?? Huh ??

I'd really, really, really like to be able to send the console messages into
the pickup folder just like the asp.net messages. What's the problem here?
I've searched around and I'm not seeing anything about it. I've tried
adding the local host to the relay, network service & aspnet account to the
operators, no luck :(

Any advice is greatly appreciated!

Thanks,
Ben

Nov 16 '05 #1
5 3239
Hello Ben,

The problem seems strange, since asp.net web application can send it but
console based application can't. The difference I can think of is the
account who is sending the email.

Could you please create a separated console based solution to send emails?

There are some other steps you can try:

Add Read/Write permmissions to Everyone on the Mailroot folder.

Change the following line in the code:
SmtpMail.SmtpServer = "127.0.0.1" to SmtpMail.SmtpServer = "Blank" which
should default to the local SMTP service.

Here are some references to MSDN:

Develop Web Applications with XML and Exchange 2000
http://msdn.microsoft.com/library/de...us/dnmes2k/htm
l/devwebapps.asp

Developing Applications for the Web Storage System and Outlook Web Access
http://msdn.microsoft.com/library/de...us/dnmes2k/htm
l/wssdevaccess.asp

304427 HOW TO: Do Basic File I/O in Visual Basic .NET
http://support.microsoft.com/?id=304427

Instead of MAPI controls, I told him to use System.Web.Mail:
314201 HOWTO: Send E-mail Programmatically with System.Web.Mail and Visual
http://support.microsoft.com/?id=314201

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 16 '05 #2
Ben
Just to be sure were on the same page here, both approaches succesfully send
email when the smtp server is running. The issue is, when the smtp server
is stopped the asp.net version buffers in the pickup folder while the
console application throws a CDO.Message exception. I will try your
suggestions though.

Ben
"Yan-Hong Huang[MSFT]" <yh*****@online.microsoft.com> wrote in message
news:xx**************@cpmsftngxa10.phx.gbl...
Hello Ben,

The problem seems strange, since asp.net web application can send it but
console based application can't. The difference I can think of is the
account who is sending the email.

Could you please create a separated console based solution to send emails?

There are some other steps you can try:

Add Read/Write permmissions to Everyone on the Mailroot folder.

Change the following line in the code:
SmtpMail.SmtpServer = "127.0.0.1" to SmtpMail.SmtpServer = "Blank" which
should default to the local SMTP service.

Here are some references to MSDN:

Develop Web Applications with XML and Exchange 2000
http://msdn.microsoft.com/library/de...us/dnmes2k/htm l/devwebapps.asp

Developing Applications for the Web Storage System and Outlook Web Access
http://msdn.microsoft.com/library/de...us/dnmes2k/htm l/wssdevaccess.asp

304427 HOW TO: Do Basic File I/O in Visual Basic .NET
http://support.microsoft.com/?id=304427

Instead of MAPI controls, I told him to use System.Web.Mail:
314201 HOWTO: Send E-mail Programmatically with System.Web.Mail and Visual
http://support.microsoft.com/?id=314201

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam. as p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.


Nov 16 '05 #3
Ben
This seems to be a permissions problem. We tried the read/write suggestiong
and it didn't help. Adding the account to the administrators group however
fixes everything. SMTP = off, console application email goes into the
pickup folder.

All we need now is to figure out what permission is necessary. Making the
user account an operator on the smtp server didn't seem to help a bit.
Neither did power user.
"Ben" <be*@online.nospam> wrote in message
news:Ca***************@fe37.usenetserver.com...
Just to be sure were on the same page here, both approaches succesfully send email when the smtp server is running. The issue is, when the smtp server
is stopped the asp.net version buffers in the pickup folder while the
console application throws a CDO.Message exception. I will try your
suggestions though.

Ben
"Yan-Hong Huang[MSFT]" <yh*****@online.microsoft.com> wrote in message
news:xx**************@cpmsftngxa10.phx.gbl...
Hello Ben,

The problem seems strange, since asp.net web application can send it but
console based application can't. The difference I can think of is the
account who is sending the email.

Could you please create a separated console based solution to send emails?
There are some other steps you can try:

Add Read/Write permmissions to Everyone on the Mailroot folder.

Change the following line in the code:
SmtpMail.SmtpServer = "127.0.0.1" to SmtpMail.SmtpServer = "Blank" which
should default to the local SMTP service.

Here are some references to MSDN:

Develop Web Applications with XML and Exchange 2000

http://msdn.microsoft.com/library/de...us/dnmes2k/htm
l/devwebapps.asp

Developing Applications for the Web Storage System and Outlook Web Access

http://msdn.microsoft.com/library/de...us/dnmes2k/htm
l/wssdevaccess.asp

304427 HOW TO: Do Basic File I/O in Visual Basic .NET
http://support.microsoft.com/?id=304427

Instead of MAPI controls, I told him to use System.Web.Mail:
314201 HOWTO: Send E-mail Programmatically with System.Web.Mail and Visual http://support.microsoft.com/?id=314201

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!


-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.
as
p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no

rights.



Nov 16 '05 #4
Ben
Seems like were going in circles here. The console application will send
email when the smtp server is on. When the smtp server is stopped the
console applicatoin crashes unless it is running as an administrative
account. I don't see what creating a different console application will do.
The one I have is working just fine.
"Yan-Hong Huang[MSFT]" <yh*****@online.microsoft.com> wrote in message
news:xx**************@cpmsftngxa10.phx.gbl...
Hello Ben,

The problem seems strange, since asp.net web application can send it but
console based application can't. The difference I can think of is the
account who is sending the email.

Could you please create a separated console based solution to send emails?

There are some other steps you can try:

Add Read/Write permmissions to Everyone on the Mailroot folder.

Change the following line in the code:
SmtpMail.SmtpServer = "127.0.0.1" to SmtpMail.SmtpServer = "Blank" which
should default to the local SMTP service.

Here are some references to MSDN:

Develop Web Applications with XML and Exchange 2000
http://msdn.microsoft.com/library/de...us/dnmes2k/htm l/devwebapps.asp

Developing Applications for the Web Storage System and Outlook Web Access
http://msdn.microsoft.com/library/de...us/dnmes2k/htm l/wssdevaccess.asp

304427 HOW TO: Do Basic File I/O in Visual Basic .NET
http://support.microsoft.com/?id=304427

Instead of MAPI controls, I told him to use System.Web.Mail:
314201 HOWTO: Send E-mail Programmatically with System.Web.Mail and Visual
http://support.microsoft.com/?id=314201

Hope that helps.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
-http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam. as p&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.


Nov 16 '05 #5
Hi Ben,

Looks like you have touched on most of the issues that you can encounter
with SMTP mail. Let me make a couple of assumptions here:

I assume that you are using System.Web.Mail in your code in both the
ASP.Net application and the >net console application?

You mention that the problem only occurs when the SMTP service is not
running and the console application tries to send mail..

I Have a couple of suggestions there but there is one additional thing that
we need to determine, what version OS are you running the code and the SMTP
server on? Are they both the same machine or are we also trying to send
via port? It sounds as if the code is running on the same machine as the
SMTP server.

Here's a couple of things that we can try:
Run filemon on the machine, just to see if we are getting any permissions errors on the pickup folder, I doubt it, but better safe then sorry.
- You can of course get filemon from http://www.sysinternals.com
You do mention that adding the account to the administrators group seemed

to resolve the issue. If that is the case, I would really look at this KB
article, which may be the issue that you are seeing:

816789 Read Access to the Everyone Group Is Removed After You Install
Exchange
http://support.microsoft.com/?id=816789

It discusses problem with access to the IIS metabase, this also applies if
this is an Windows 2000 server with the latest service packs and updates.

I hope this helps, please let me know your progress and if you encounter
any issues.

Thank you,
Jeff Garman

Microsoft Developer Support (Messaging Technologies)

This posting is provided "AS IS", with no warranties, and confers no rights.

Nov 16 '05 #6

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

Similar topics

3
by: James M. Luongo | last post by:
Hello, I am having problems with the mail() function, but I don't know what the problems are. Here is a snippet of code: $to = "jmluongo@comcast.net"; $from = "Gallery@gafok.com";...
3
by: Markus Weber | last post by:
Hi, we use htmlMimeMail-2.5.1 (http://www.phpguru.org/mime.mail.html) to send mails. If I send an e-mail with the subject "Das Öl - Öl Öl - Ö Ä Ü ß - test test" I will receive an e-mail with...
14
by: OldGuy | last post by:
Hi All Sendmail 8.12.11 php 4.3.9 Sendmail is installed and works properly. php is NOT in safemode from the command line; mail user@domain.com < testmsg works fine.
1
by: Irmen de Jong | last post by:
Hi I'm trying to create e-mail content using the email.MIMEText module. It basically works, until I tried to send mail in non-ascii format. What I did, to test both iso-8859-15 and UTF-8...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
6
by: rekaeps | last post by:
We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles sending e-mail from the server when accessing the web site from a separate client computer. Also, in the same scenario,...
1
by: mayanksrmcem | last post by:
I need ur help. I want to send emails through php code. but there are some problems n i'm not able to understand the actual problems. the code , i've used is as followes---- <?php if...
5
by: Dave | last post by:
Hi All, I'm experiencing problems with sending mail using mail() to forwarded email accounts. The problem seems to revolve around the optional 4th argument of mail(), namely 'additional headers'....
3
by: shror | last post by:
I was testing to post a form and echo message according to the submitted box using else if and then mail() the box result to myself just for testing the procedure but i got some problems: 1# the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.