473,769 Members | 2,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET SMTP mail never received

Hi all,

I am trying to use the System.Net.Mail class for the first time, with
ASP.NET 2.0.

I setup everything according to
http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me
a working environment for sending mails.

I am sure the code is correct, there are no errors and everything seems
to work fine. However, I never receive the email. I've done some
research before posting this, and I suspect it is never sent because I
use a totally random email for the Msg.From Attribute, which may be
wrong. I am under Windows XP, IIS 6.0, and I would like to know how am
I supposed to know what valid email can I put in the From ?? Is there a
way to add mail (forward only) addresses from which we can effectively
send emails, somewhere in IIS or anywhere else? How am I supposed to
know what email to use in the From, if I simply sent it from localhost
(no domain or anything, just my own computer)?

Any help on this would be much appreciated,
thanks in advance!

Nov 13 '06 #1
11 2723
A quick check would be to see if you're dropping your email messages at the
SMTP relay.

%systemdrive%\i netpub\mailroot \drop
%systemdrive%\i netpub\mailroot \badmail
%systemdrive%\i netpub\mailroot \queue

That'd help to narrow out if it's the code (if your message is being generated
and packaged OK) or the SMTP on your web server.

In the from field, it depends on your SMTP server. Our Exchange servers
are locked down and require you to have the same domain, so we use donotreply@{
our domain here }.com or something similar. You should be able to use your
own email address.

If you're curious about your code, have you tried using breakpoints in your
code and stepping through to make sure it hits each step?

-dl

---
David Longnecker
Web Developer
http://blog.tiredstudent.com
Hi all,

I am trying to use the System.Net.Mail class for the first time, with
ASP.NET 2.0.

I setup everything according to
http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me
a working environment for sending mails.

I am sure the code is correct, there are no errors and everything
seems to work fine. However, I never receive the email. I've done some
research before posting this, and I suspect it is never sent because I
use a totally random email for the Msg.From Attribute, which may be
wrong. I am under Windows XP, IIS 6.0, and I would like to know how am
I supposed to know what valid email can I put in the From ?? Is there
a way to add mail (forward only) addresses from which we can
effectively send emails, somewhere in IIS or anywhere else? How am I
supposed to know what email to use in the From, if I simply sent it
from localhost (no domain or anything, just my own computer)?

Any help on this would be much appreciated,
thanks in advance!

Nov 13 '06 #2
Thanks for quick reply :)

I've checked in all subfolders in %systemdrive%\i netpub\mailroot ,
nothing there. Also, I've enabled tracing in IIS, to see if it would
give some hints, here's what it has generated when sending mail :
23:01:24 192.168.0.100 EHLO - 250
23:01:24 192.168.0.100 MAIL - 250
23:01:24 192.168.0.100 RCPT - 550
23:01:24 192.168.0.100 QUIT - 0

I haven't a clue of what that means...

For the From field, I am really no expert in terms of domains and all,
so that's why I suspect the problem is there...you say you use your
domain, but what's mine if I simply want to send an email from a
localhost IIS server, not attached to any domain? I tried to send from
my email, as you said, (which is a gmail.com address), and it still
doesn't send..

I stepped into my code line by line (it isn't that long), and
everything is executed normally, even the
MailObj.Send(Ms g)

So, I really think it that 'domain' problem :\

thanks again!

David Longnecker wrote:
A quick check would be to see if you're dropping your email messages at the
SMTP relay.

%systemdrive%\i netpub\mailroot \drop
%systemdrive%\i netpub\mailroot \badmail
%systemdrive%\i netpub\mailroot \queue

That'd help to narrow out if it's the code (if your message is being generated
and packaged OK) or the SMTP on your web server.

In the from field, it depends on your SMTP server. Our Exchange servers
are locked down and require you to have the same domain, so we use donotreply@{
our domain here }.com or something similar. You should be able to use your
own email address.

If you're curious about your code, have you tried using breakpoints in your
code and stepping through to make sure it hits each step?

-dl

---
David Longnecker
Web Developer
http://blog.tiredstudent.com
Hi all,

I am trying to use the System.Net.Mail class for the first time, with
ASP.NET 2.0.

I setup everything according to
http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me
a working environment for sending mails.

I am sure the code is correct, there are no errors and everything
seems to work fine. However, I never receive the email. I've done some
research before posting this, and I suspect it is never sent because I
use a totally random email for the Msg.From Attribute, which may be
wrong. I am under Windows XP, IIS 6.0, and I would like to know how am
I supposed to know what valid email can I put in the From ?? Is there
a way to add mail (forward only) addresses from which we can
effectively send emails, somewhere in IIS or anywhere else? How am I
supposed to know what email to use in the From, if I simply sent it
from localhost (no domain or anything, just my own computer)?

Any help on this would be much appreciated,
thanks in advance!
Nov 13 '06 #3
In addition to the previous post

(inetpub/mail stuff)

you also want to make sure you specifying the correct "authentication ".

Check this post:
2/8/2006
Smarter Email/Smtp setup with DotNet Configuration Sections (1.1 and 2.0)
http://sholliday.spaces.live.com/blog/
Try different email (recipient) combo's , because sometimes something like
hotmail will block an incoming email. That's probably not the issue, but I
mention it anyways.


"ibiza" <la******@gmail .comwrote in message
news:11******** *************@b 28g2000cwb.goog legroups.com...
Hi all,

I am trying to use the System.Net.Mail class for the first time, with
ASP.NET 2.0.

I setup everything according to
http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me
a working environment for sending mails.

I am sure the code is correct, there are no errors and everything seems
to work fine. However, I never receive the email. I've done some
research before posting this, and I suspect it is never sent because I
use a totally random email for the Msg.From Attribute, which may be
wrong. I am under Windows XP, IIS 6.0, and I would like to know how am
I supposed to know what valid email can I put in the From ?? Is there a
way to add mail (forward only) addresses from which we can effectively
send emails, somewhere in IIS or anywhere else? How am I supposed to
know what email to use in the From, if I simply sent it from localhost
(no domain or anything, just my own computer)?

Any help on this would be much appreciated,
thanks in advance!

Nov 13 '06 #4
well, all setup in IIS should be fine.

Do you mean 'anonymous' as authentication (in IIS)?
sloan wrote:
In addition to the previous post

(inetpub/mail stuff)

you also want to make sure you specifying the correct "authentication ".

Check this post:
2/8/2006
Smarter Email/Smtp setup with DotNet Configuration Sections (1.1 and 2.0)
http://sholliday.spaces.live.com/blog/
Try different email (recipient) combo's , because sometimes something like
hotmail will block an incoming email. That's probably not the issue, but I
mention it anyways.


"ibiza" <la******@gmail .comwrote in message
news:11******** *************@b 28g2000cwb.goog legroups.com...
Hi all,

I am trying to use the System.Net.Mail class for the first time, with
ASP.NET 2.0.

I setup everything according to
http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me
a working environment for sending mails.

I am sure the code is correct, there are no errors and everything seems
to work fine. However, I never receive the email. I've done some
research before posting this, and I suspect it is never sent because I
use a totally random email for the Msg.From Attribute, which may be
wrong. I am under Windows XP, IIS 6.0, and I would like to know how am
I supposed to know what valid email can I put in the From ?? Is there a
way to add mail (forward only) addresses from which we can effectively
send emails, somewhere in IIS or anywhere else? How am I supposed to
know what email to use in the From, if I simply sent it from localhost
(no domain or anything, just my own computer)?

Any help on this would be much appreciated,
thanks in advance!
Nov 13 '06 #5
No, the end smtp server sometimes need authentication.

Read the blog... will show more.
sometimes, like with dialup, you use "none" authentication.

sometimes , they want you to at least pass them your account id, and a
password.
(basic)

sometimes, they want a password, username and to use SSL (ssl
authentication)

It mimicks all the smtp settings you'd find under Outlook Express ...


"ibiza" <la******@gmail .comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
well, all setup in IIS should be fine.

Do you mean 'anonymous' as authentication (in IIS)?
sloan wrote:
In addition to the previous post

(inetpub/mail stuff)

you also want to make sure you specifying the correct "authentication ".

Check this post:
2/8/2006
Smarter Email/Smtp setup with DotNet Configuration Sections (1.1 and
2.0)
http://sholliday.spaces.live.com/blog/
Try different email (recipient) combo's , because sometimes something
like
hotmail will block an incoming email. That's probably not the issue,
but I
mention it anyways.


"ibiza" <la******@gmail .comwrote in message
news:11******** *************@b 28g2000cwb.goog legroups.com...
Hi all,
>
I am trying to use the System.Net.Mail class for the first time, with
ASP.NET 2.0.
>
I setup everything according to
http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me
a working environment for sending mails.
>
I am sure the code is correct, there are no errors and everything
seems
to work fine. However, I never receive the email. I've done some
research before posting this, and I suspect it is never sent because I
use a totally random email for the Msg.From Attribute, which may be
wrong. I am under Windows XP, IIS 6.0, and I would like to know how am
I supposed to know what valid email can I put in the From ?? Is there
a
way to add mail (forward only) addresses from which we can effectively
send emails, somewhere in IIS or anywhere else? How am I supposed to
know what email to use in the From, if I simply sent it from localhost
(no domain or anything, just my own computer)?
>
Any help on this would be much appreciated,
thanks in advance!
>

Nov 14 '06 #6
I made it to put the message in the
%systemdrive%\i netpub\mailroot \queue folder, but now, I can't tell it
is still in queue...I made the change to the Msg.To field ->
'donotreply@ibi za'
where ibiza is my domain name (computer name)

Any ideas why it's stocked in queue now?

sloan wrote:
No, the end smtp server sometimes need authentication.

Read the blog... will show more.
sometimes, like with dialup, you use "none" authentication.

sometimes , they want you to at least pass them your account id, and a
password.
(basic)

sometimes, they want a password, username and to use SSL (ssl
authentication)

It mimicks all the smtp settings you'd find under Outlook Express ...


"ibiza" <la******@gmail .comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
well, all setup in IIS should be fine.

Do you mean 'anonymous' as authentication (in IIS)?
sloan wrote:
In addition to the previous post
>
(inetpub/mail stuff)
>
you also want to make sure you specifying the correct "authentication ".
>
Check this post:
2/8/2006
Smarter Email/Smtp setup with DotNet Configuration Sections (1.1 and
2.0)
http://sholliday.spaces.live.com/blog/
>
>
Try different email (recipient) combo's , because sometimes something
like
hotmail will block an incoming email. That's probably not the issue,
but I
mention it anyways.
>
>
>
>
"ibiza" <la******@gmail .comwrote in message
news:11******** *************@b 28g2000cwb.goog legroups.com...
Hi all,

I am trying to use the System.Net.Mail class for the first time, with
ASP.NET 2.0.

I setup everything according to
http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me
a working environment for sending mails.

I am sure the code is correct, there are no errors and everything
seems
to work fine. However, I never receive the email. I've done some
research before posting this, and I suspect it is never sent because I
use a totally random email for the Msg.From Attribute, which may be
wrong. I am under Windows XP, IIS 6.0, and I would like to know how am
I supposed to know what valid email can I put in the From ?? Is there
a
way to add mail (forward only) addresses from which we can effectively
send emails, somewhere in IIS or anywhere else? How am I supposed to
know what email to use in the From, if I simply sent it from localhost
(no domain or anything, just my own computer)?

Any help on this would be much appreciated,
thanks in advance!
Nov 14 '06 #7
re:
is still in queue...I made the change to the Msg.To field ->
'donotreply@ibi za'
where ibiza is my domain name (computer name)
How do you expect a message to be delivered if it doesn't have a valid "To" address ?

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"ibiza" <la******@gmail .comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
>I made it to put the message in the
%systemdrive%\i netpub\mailroot \queue folder, but now, I can't tell it
is still in queue...I made the change to the Msg.To field ->
'donotreply@ibi za'
where ibiza is my domain name (computer name)

Any ideas why it's stocked in queue now?
sloan wrote:
>No, the end smtp server sometimes need authentication.

Read the blog... will show more.
sometimes, like with dialup, you use "none" authentication.

sometimes , they want you to at least pass them your account id, and a
password.
(basic)

sometimes, they want a password, username and to use SSL (ssl
authentication )

It mimicks all the smtp settings you'd find under Outlook Express ...


"ibiza" <la******@gmail .comwrote in message
news:11******* *************** @m73g2000cwd.go oglegroups.com. ..
well, all setup in IIS should be fine.

Do you mean 'anonymous' as authentication (in IIS)?
sloan wrote:
In addition to the previous post

(inetpub/mail stuff)

you also want to make sure you specifying the correct "authentication ".

Check this post:
2/8/2006
Smarter Email/Smtp setup with DotNet Configuration Sections (1.1 and
2.0)
http://sholliday.spaces.live.com/blog/
Try different email (recipient) combo's , because sometimes something
like
hotmail will block an incoming email. That's probably not the issue,
but I
mention it anyways.


"ibiza" <la******@gmail .comwrote in message
news:11******** *************@b 28g2000cwb.goog legroups.com...
Hi all,

I am trying to use the System.Net.Mail class for the first time, with
ASP.NET 2.0.

I setup everything according to
http://www.codeproject.com/aspnet/EasySMTP_package.asp, which gives me
a working environment for sending mails.

I am sure the code is correct, there are no errors and everything
seems
to work fine. However, I never receive the email. I've done some
research before posting this, and I suspect it is never sent because I
use a totally random email for the Msg.From Attribute, which may be
wrong. I am under Windows XP, IIS 6.0, and I would like to know how am
I supposed to know what valid email can I put in the From ?? Is there
a
way to add mail (forward only) addresses from which we can effectively
send emails, somewhere in IIS or anywhere else? How am I supposed to
know what email to use in the From, if I simply sent it from localhost
(no domain or anything, just my own computer)?

Any help on this would be much appreciated,
thanks in advance!


Nov 14 '06 #8
"ibiza" <la******@gmail .comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
'donotreply@ibi za'
where ibiza is my domain name (computer name)

Any ideas why it's stocked in queue now?
Because that's an invalid email address...
Nov 14 '06 #9
well that's exactly what I want to know. How do I add valid emails to
my smtp server (setuped in IIS?), so I can send emails from those
emails.
Mark Rae wrote:
"ibiza" <la******@gmail .comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
'donotreply@ibi za'
where ibiza is my domain name (computer name)

Any ideas why it's stocked in queue now?

Because that's an invalid email address...
Nov 14 '06 #10

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

Similar topics

0
1269
by: michi | last post by:
Hello :) When I execute following asp.net code **** Web.Mail.SmtpMail.SmtpServer = "squadron" Web.Mail.SmtpMail.Send("wwwmike@gmx.ch", "wwwmike@gmx.ch", "subj", "message") ****
1
6290
by: michi | last post by:
Hi there.... Got here a tricky thing with my SMTP. First I show you what works on my machine.. **This Works** SmtpMail.SmtpServer = "mail.gmx.net" <-gmx is my mail provider SmtpMail.Send"mymail@gmx.net", "somebody@xxx.ch", "sub",
17
517
by: Jesper Nielsen | last post by:
Hi all! I am currently planning an e-mail service. The base core of the service will simply be a MDaemon mail server with a modified WorldClient as the frontend. Unfortuneately, MDaemon cannot add a footer to all outgoing mails (like "Get a FREE 10GB mail account at..."), so I've thought of this: MDaemon can be setup to use a so-called smarthost. If setup, MDaemon will forward all outgoing mail to another SMTP server, which will then...
34
18270
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,
7
7743
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee free edition for anti-virus. I use an ISP provider from my country and according to them I do not need to perform authentication while sending mails through their SMTP address. Thus I am using external SMTP server. I don't have IIS installed...
1
2231
by: kuratkull | last post by:
Ok, I wrote a Honeypot in perl. It listens on port 25 and acts as a crude SMTP server. It responds to the most basic commands(helo, mail from, rcpt to, data) needed for sending mail. It has no way of closing the socket from the client side, so it acts also as a tarpit by not allowing automatic spam mailers to disconnect from it. It does not actually send any mail, but simulates the situation. Problems I'm having: 1.#elsif ($message =~...
0
2027
by: ja99son | last post by:
I have a requirement to route mail bound for certain domains using a TLS connection. I have a mailsweeper box (which cannot use TLS) which is configured to route mail for those specific domains to a W2k3 Server running IIS 6 with the SMTP component installed. All outbound mail received by the IIS server from mailsweeper needs to be routed from the IIS server to my ISP's smarthost. All incoming mail received from the ISP by the IIS...
4
4836
by: lage | last post by:
Hi, I am working with a web site that uses CDONTS from a function in a Com+ component to send mail to clients after sign up etc, as well as sending clients mail to support from a web form. A virtual default SMTP server is running in !!S (6.0) We have moved the system to a new server (Windows 2003 Server as the previous installation) and the mail worked fine a few days. Now we cannot send any mail from the system. SMTP is not my...
7
10943
by: lilbit02 | last post by:
I'm trying to figure this out with out any Java experience. I'm trying to write a program that will send a SMTP email. I was given a shell and I do know how to establish a connection. My next question is how do I Send MAIL FROM command, Send RCPT TO command, Send DATA command, Send message data and End with line with a single period. Will this be just a matter or printing this information? Someone please help me figure this out. import...
0
9423
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
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9861
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
8869
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
7406
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
6672
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
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2814
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.