Re: ASP.Net V 2.0 problems with sending email
- From: Mike Owen <whatnospam@xxxxxxxxxxxxx>
- Date: Wed, 26 Jul 2006 05:46:02 -0700
Thanks for your help everybody!
I have switched tracing on as you suggested, and it seems as though the mail
gets sent to a queue somewhere. The last bit of the tracer file produced is
as below:
System.Net.Sockets Verbose: 0 : [2356] 00000000 : 32 35 30 20 32 2E 36 2E-30
20 3C 42 32 42 57 45 : 250 2.6.0 <B2BWE
System.Net.Sockets Verbose: 0 : [2356] 00000010 : 42 53 45 52 56 45 52 30-31
4E 73 6F 6B 4C 30 30 : BSERVER01NsokL00
System.Net.Sockets Verbose: 0 : [2356] 00000020 : 30 30 30 30 35 65 40 62-32
62 69 6E 74 65 72 6E : 00005e@b2bintern
System.Net.Sockets Verbose: 0 : [2356] 00000030 : 65 74 73 6F 6C 75 74 69-6F
6E 73 2E 63 6F 2E 75 : etsolutions.co.u
System.Net.Sockets Verbose: 0 : [2356] 00000040 : 6B 3E 20 51 75 65 75 65-64
20 6D 61 69 6C 20 66 : k> Queued mail f
System.Net.Sockets Verbose: 0 : [2356] 00000050 : 6F 72 20 64 65 6C 69 76-65
72 79 0D 0A : or delivery..
System.Net.Sockets Verbose: 0 : [2356] Exiting Socket#60068066::Receive()
-> 93#93
System.Net Verbose: 0 : [2356] Exiting SmtpClient#45004109::Send()
System.Net.Sockets Verbose: 0 : [2220] Socket#60068066::Dispose()
..... Which as you can see has a bit titled 'queued mail for delivery' at the
end.
I don't get the non delivery message for at least a day, and it comes from
the web server. Presumably it is trying to deliver it from the web server,
which from what you have said sounds wrong as it is meant to be using a third
parties smtp server. It is also strange that I get the non delivery message,
yet the message itself does not get through - The must be getting sent
somehow!
As an aside nothing is in any of the 'c:\inetpub\mailroot' folders.
Any more thoughts?
"Steven Cheng[MSFT]" wrote:
Hello Mike,.
I suggest you try turn on the network Tracing asMischa has suggested. This
is a cool feature provided in .net framework 2.0 that can help diagnostic
network component issues(such as smtp, httprequest, ....).
#How to: Configure Network Tracing
http://msdn2.microsoft.com/en-us/library/ty48b824.aspx
Also, as for the System.Net.Mail.SmtpClient class, it does not rely on the
local IIS smtp service. It can be configured to use three mail delivery
mode:
1. using network smtp server(such as Exchange server in local intranet)
2. using local IIS smtp service(first put the mail message to the IIS smtp
service's pickup directory)
3. using a 3rd party custom smtp service(specify the custom smtp service's
pickup directory and the component will put the message file there)
This can be configuerd by the SmtpClient.DeliveryMethod property:
#SmtpClient.DeliveryMethod Property
http://msdn2.microsoft.com/en-us/library/system.net.mail.smtpclient.delivery
method.aspx
for example, the following code configure the smtpclient to use a network
smtp server(I've tested through a local exchange server).
sc.DeliveryMethod = SmtpDeliveryMethod.Network;
sc.Host = "remote smtp server name or ip address";
In such case, the component won't use local IIS smtpservice. If the
smtpclient is using local IIS smtp service, you can check the messages
under the smtpservice's pickup directory(you can check the path in IIS
manager). For your scenario, are you using a remote smtp server in the
local intranet? Based on the symptom you mentioned, the smtpclient has
sent out the messages to the server, but the smtp server fail to deliver
the message to the ultimate recipient. You can also try sending some mail
to the recipients in your local network environment to see whether it works.
Anyway, please feel free to post here if you have any further finding or
questions.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial
response from the community or a Microsoft Support Engineer within 1
business day is
acceptable. Please note that each follow up response may take approximately
2 business days
as the support professional working with you may need further investigation
to reach the
most efficient resolution. The offering is not appropriate for situations
that require
urgent, real-time or phone-based interactions or complex project analysis
and dump analysis
issues. Issues of this nature are best handled working with a dedicated
Microsoft Support
Engineer by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- Follow-Ups:
- Re: ASP.Net V 2.0 problems with sending email
- From: Mike Owen
- Re: ASP.Net V 2.0 problems with sending email
- References:
- Re: ASP.Net V 2.0 problems with sending email
- From: Mischa Kroon
- Re: ASP.Net V 2.0 problems with sending email
- From: Steven Cheng[MSFT]
- Re: ASP.Net V 2.0 problems with sending email
- Prev by Date: Re: CDO Mail sending error
- Next by Date: Re: ASP.Net V 2.0 problems with sending email
- Previous by thread: Re: ASP.Net V 2.0 problems with sending email
- Next by thread: Re: ASP.Net V 2.0 problems with sending email
- Index(es):
Relevant Pages
|
Loading