473,804 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3260
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.SmtpSe rver = "127.0.0.1" to SmtpMail.SmtpSe rver = "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.as p

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 Programmaticall y 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.microso ft.com/default.aspx?sc id=/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******** ******@cpmsftng xa10.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.SmtpSe rver = "127.0.0.1" to SmtpMail.SmtpSe rver = "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.as p

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 Programmaticall y 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.microso ft.com/default.aspx?sc id=/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.nos pam> wrote in message
news:Ca******** *******@fe37.us enetserver.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******** ******@cpmsftng xa10.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.SmtpSe rver = "127.0.0.1" to SmtpMail.SmtpSe rver = "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.as p

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 Programmaticall y 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.microso ft.com/default.aspx?sc id=/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******** ******@cpmsftng xa10.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.SmtpSe rver = "127.0.0.1" to SmtpMail.SmtpSe rver = "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.as p

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 Programmaticall y 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.microso ft.com/default.aspx?sc id=/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
4081
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"; $subject = "Gallery Comment";
3
5054
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 the subject "Das Öl - ÖlÖl - ÖÄÜß - test test". Some spaces have been removed.
14
22635
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
5752
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 encodings, was this: ---- from email.MIMEText import MIMEText m=MIMEText(u"body text including an Euro char \u20ac\n", _charset="iso-8859-15") m = "from@mail.invalid"
8
5484
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 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
34
18310
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 "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
6
2540
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, I'm having trouble writing to the server's event log. Here's some details: Server and workstation both in the same workgroup Logged into server as local Administrator Logged into workstation as a local user that is only in the Users group on
1
3116
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 (isset($_REQUEST)) { $to=$_REQUEST; $sub=$_REQUEST;
5
3950
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'. It seems that when I populate this 4th argument of mail(), any emails sent to an email forwarding service email address (ukreg/fasthosts actually) fail to reach their destination. Direct email addresses seem to work fine.
3
1969
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 text box value is not echoed to my result page 2# also the mail doesn't send me the text box value 3# the address bar view that the value entered was the correct value i entered so please help me the 111.htm form code is:
0
9593
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10343
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10088
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9169
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7633
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4306
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 we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.