Sending Email using SMPT server with asp.net

I have simple email program that sends emails using smpt server in asp.net. Works fine in on my XP machine but soon as I put it on my win 2000 pro server with same smpt settings it does not send email, all the email are put in Quene directory of mail server. Here is my code I am using..

Sub btnSendEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim objMail As New MailMessage()
objMail.From = "sudhir@attbi.com"
objMail.To = sombody@attbi.com"
objMail.Subject = "testing"
objMail.BodyFormat = MailFormat.Text
objMail.Body = "this is a test"
SmtpMail.SmtpServer = "Notebook"
SmtpMail.Send(objMail)
End Sub

Do i need reinstall my win2000 OS? don't get it why it works in XP and not in win2000.
thanks
[888 byte] By [Sudhir kapoor] at [2007-11-18 7:42:41]
# 1 Re: Sending Email using SMPT server with asp.net
See the post below this one, i just explained what might be your porblem. Its probably the part about the cdosys.dll
BinaryAnge at 2007-11-9 11:42:03 >
# 2 Re: Sending Email using SMPT server with asp.net
Originally posted by BinaryAnge
See the post below this one, i just explained what might be your porblem. Its probably the part about the cdosys.dll

I tried your the steps from "ASP.NET and outlook woes " post and still no its doing the same sort of thing. Its putting all my email inside C:\Inetpub\mailroot\Queue. Any other suggestion you may have please pass on. I really don't want to go buy winxp and run it on my server just for this reason.
thanks
Sudhir kapoor at 2007-11-9 11:43:04 >
# 3 Re: Sending Email using SMPT server with asp.net
Sorry, That was the extent of what i know about it.
BinaryAnge at 2007-11-9 11:44:12 >
# 4 Re: Sending Email using SMPT server with asp.net
ur configured stmp server could not send out the mail ulike the one configured at Win XP. U DON't NEED reinstall my win2000 OS, all u have to do is to check the smtp setting between both machines.

A faster way to troubleshoot is to point ur W2k server to XP via smarthost.

In ur w2k server, set the smarthost of ur smtp virtual server to windows XP machine IP. If this works then ur W2k smtp server requires configuration
newvisva at 2007-11-9 11:45:07 >
# 5 Re: Sending Email using SMPT server with asp.net
Originally posted by newvisva
ur configured stmp server could not send out the mail ulike the one configured at Win XP. U DON't NEED reinstall my win2000 OS, all u have to do is to check the smtp setting between both machines.

A faster way to troubleshoot is to point ur W2k server to XP via smarthost.

In ur w2k server, set the smarthost of ur smtp virtual server to windows XP machine IP. If this works then ur W2k smtp server requires configuration

I tried your method and email works. I just left my notebook on since its connected to my router my server can find it. Mail seems to work form my server while notebook computer is up and running. If I turn if off and it stop working.
I have matched the setting for my xp machine and win2000 machine they do match. Only thing different is that I am using port 80 for my webpages. Which has a ip address.
What setup should I have for my SMTP server. Following are the setup I have:

Under General Tab
Default SMTP Virtual Server
[All unAssigned]

Advanced:
[All unassigned] port 25

Access radiobutton:
Connection: All except the list below
Relay:All except the list below

Delivery Tab
Advanced:localhost {for fully-qualified domain name:}
AdvanceScurity: Anonymous access

above are my settings for the smpt server. Please advice if they need to modified
thanks again
Sudhir kapoor at 2007-11-9 11:46:08 >
# 6 Re: Sending Email using SMPT server with asp.net
The way i look at it... there's no problem with ur code or the server setting.

It's just the grant Privilege of ur network settings/ or firewall/ or not hooking up with DNS that is preventing this. Call up ur network administrator and tell him/her about this.

Another method will be swapping the network IP address between both PC. If this doesn't work then ur internal network is giving u access via the username that is logged on.
newvisva at 2007-11-9 11:47:06 >
# 7 Re: Sending Email using SMPT server with asp.net
Originally posted by newvisva
The way i look at it... there's no problem with ur code or the server setting.

It's just the grant Privilege of ur network settings/ or firewall/ or not hooking up with DNS that is preventing this. Call up ur network administrator and tell him/her about this.

Another method will be swapping the network IP address between both PC. If this doesn't work then ur internal network is giving u access via the username that is logged on.

thanks Newvisva,
I have this server at home with dlink wireless router. My port 80 open for my website. I am getting free DNS name service from http://www.dyndns.org/services/statdns/ for my website. I don't know if that has somthing do with it. May be I have to add somthing to there mailexchange program for emails. I thinks its called MX. I Just don't know. Do I have setup my router for port 25 with different IP address? too many questions ...
I guess my notebook where I do my development does not have port 80 open for website publishing, may be thats why smtp server works.
I can't switch IP address since its register for the DNS service.
any suggestions...
thanks for your help..
sk
Sudhir kapoor at 2007-11-9 11:48:12 >
# 8 Re: Sending Email using SMPT server with asp.net
Do not change ur port numbers, there're fine.

1.
W2K IP ADD: XXX
IIS SMTP SMART HOST :YYY

WXP IP ADD: YYY
IIS SMTP SMART HOST: (NOTHING)

This config above works right?

In that case could u connect the Win 2k instead of XP to router?

And also try this (it's just trial and error..)
Under General Tab
Default SMTP Virtual Server
[All unAssigned]--> switch this to the IP via the combobox..

If these method doesn't work then I'm not to sure as well
newvisva at 2007-11-9 11:49:15 >
# 9 Re: Sending Email using SMPT server with asp.net
Originally posted by newvisva
Do not change ur port numbers, there're fine.

1.
W2K IP ADD: XXX
IIS SMTP SMART HOST :YYY

WXP IP ADD: YYY
IIS SMTP SMART HOST: (NOTHING)

This config above works right?

In that case could u connect the Win 2k instead of XP to router?

And also try this (it's just trial and error..)
Under General Tab
Default SMTP Virtual Server
[All unAssigned]--> switch this to the IP via the combobox..

If these method doesn't work then I'm not to sure as well

Well they way things are connected are wireless using dlink router. I am not sure what you mean by connect XP to the router instead of win2k. Because If I turn both machine on they are connected to the router.

I am not sure How I will assign the IIS SMTP SMART HOST :YYY .
Do I need to Add it from Access tab and add it to the Realy and connection (by granting permission)?
By the way when ever I go in and add my webserver IP address to the Realy and connection and select the option :(Only listed below) , I get error message while sending the email. If I leave it at All except the list below, I do not receive an email error messages.

Any way What I have tested so far is that If I have both My notebook which has IP of ...102 and my webserver at ..103, the email goes through my notebook fine. if I turn my notebook off email does not go through at all from my webserver.
If I turn my webserver off(win2k) and have my xp notebook turned on emails goes through fine.

And there is no password to get in either of my machines.

Now may be tell me what should I do. Because I don't undersatand about adding IP address to the SMPT server?
thanks
Sudhir kapoor at 2007-11-9 11:50:13 >
# 10 Re: Sending Email using SMPT server with asp.net
Existing config
W2K (WebServer) IP at ...103
WXP (notebook) IP at ...102

Change to New Config
(but gotta shutdown both PC to avoid IP Conflict b4 changing IP)
W2K (WebServer) IP at ...102
WXP (notebook) IP at ...103

So which means now ur W2K can send out (but ur notebook won't be able to send). Does that work?

If that works then I'll tell u what to do next.
newvisva at 2007-11-9 11:51:16 >
# 11 Re: Sending Email using SMPT server with asp.net
Hi,

I got a similar problem. I got IIS installed on my Window XP at home. I connect to internet via MSN. When I try to send email for an out side account, they just go to inetpub/mailroot/queue folder. If I got the to address for a local address, the email goes to inetput/mailroot/drop folder. Also if I put a text file with email addresses for outside in the pickup folder, it goes to queue folder, which means smtp server is working.

I am wondering what setting is needed for smtp virtual server proerties for the email to work correctly. I do not have a smart host name. If I use smtp.email.msn.com for smart host, the emails still go to the queue folder and sit there.

DKR. :mad:
dkr at 2007-11-9 11:52:16 >
# 12 Re: Sending Email using SMPT server with asp.net
Try re-starting ur SMTP services. Preferbly use IP address. Check ur badmails directory to find any error.

In ur smart host give IP instead of smtp.email.msn.com
newvisva at 2007-11-9 11:53:13 >
# 13 Re: Sending Email using SMPT server with asp.net
Hi NEWVISVA,

Thanks for your reply. I did a lot of search and trial after the post. MSN is my ISP. I contacted them. They say that they do not allow their server to send emails to other IP address. I think in that case it may be consider third party email.

Now what I need is some other smart host or another way to rech to the destination.

DKR
dkr at 2007-11-9 11:54:20 >