473,394 Members | 1,739 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,394 software developers and data experts.

ASP .Net 1.1 Sending Emails - Configuration Question

I got it working BUT......
In my code I don't specify smtp server at all.
So I don't know which server its using behind the scene.
How can I find out and where this configuration is?
Is this a CDO configuration?
I could not find anything in the registry.
The smtp server has been changed so i am tryin to figure out where I need to change it - nothing in my web.config and I don't even specify smtp server :-(
Many thanks!
using System.Web.Mail;
MailMessage msgMail = new MailMessage();
msgMail.To = toperson;
msgMail.From = fromperson;
msgMail.Subject = emailsubject;
msgMail.BodyFormat = MailFormat.Html;
msgMail.Body = emailbody;
SmtpMail.Send(msgMail);
Nov 10 '08 #1
15 1654
Plater
7,872 Expert 4TB
If you don't specify one, I think it tries to use an smtp server running on the local computer. Which either has no username/password, or would use the windows authentication
Nov 10 '08 #2
Hi,
Is there a way to determine what smtp is running locally?
or a profile or something I can look or modify?
Thanks!!
Nov 10 '08 #3
Plater
7,872 Expert 4TB
It will (almost always?) be the SMTP service which runs under the IIS service (inetinfo.exe). You can verify that it is enabled by running "services.msc" and scrolling down to see "Simple Mail Transfer Protocol (SMTP)" and see if it is on.

I don't know for sure, but I would imagine you can control it from the IIS control panel somehow (under "Administrative Tools")
Nov 10 '08 #4
but how to determine which SMTP it points to? I need to make a change and point to a different SMTP?
Nov 10 '08 #5
Plater
7,872 Expert 4TB
Ahh, well you can spcify that in your SMTPClient object.
There is also a way to put it into your web.config I think, but I am unfamiliar with that
Nov 10 '08 #6
No that's not what I meant.
I don't specify SMTP in my .Net application. so lets leave it as is.
I need to know how to edit/view SMTP settings on the machine where my app is running(not sure where to look - IIS or what).

May be I got you confused. :-)
Let's say you have a new machine - how to and where to look for smtp settings on this machine so when I install my .Net app I will know which smtp server it will be using to send emails out(and its not specified in my .Net app , remember?)
Many Thanks!!!!
Nov 10 '08 #7
joedeene
583 512MB
If I understand you correctly, from your previous post, you want to configure your SMTP settings basically? Or get to the properties window.

Well, In your Computer Management window, you should know how to navigate to the IIS Service. Once there, you should have a folder, (or a couple depends on what features of IIS you have installed), Right-click on the one that either says something about "SMTP Virtual Server" or it should have an envelope icon on the left of it. Then there is a "Properties" Item, click on that and it will open the properties window. Is that what you were looking for? If not, you've got me confused too :-P

NOTE: This is on Windows XP.

joedeene
Nov 11 '08 #8
joedeene,
the problem is that Virtual SMTP under IIS is not showing smtp host(at least in my case). I think it comes from somewhere else. I need to know where I can look it up and how to change it.
Many thanks!!!
Nov 11 '08 #9
Plater
7,872 Expert 4TB
I no longer have any idea what you are talking about.

A new windows machine, if IIS is turned on, would have the SMTP service as I dictated in one of my posts.
You said no, you wanted to change the settings in your program. So I told you that picking an smtp server and applying username/password was done in the SMTPClient object. You said no you want to edit the SMTP server on the machine.
Which has brought us RIGHT back to IIS. Now, IF, on the odd case, you use a third party SMTP solution, I would suggest you ask for help from them, as it's NOT a .NET question, and we really don't do support for third party applications.
Nov 11 '08 #10
Hi Plater,
Sorry I confused you...
I meant from IIS console-->
but how to determine which SMTP it points to? I need to make a change and point to a different SMTP?

I went under Virtual SMTP in IIS but couldn't find any references to actual SMTP mail servers. Under Rely tab its not specifying anything either.

But when I send an email from my .Net app it still sends to a specific smpt mail server - I want to know where it picks it setting since I don't specify it in my .Net app
Nov 11 '08 #11
Plater
7,872 Expert 4TB
IIS doesn't "point" to an smtp server. It *HAS* one.

If you want your application to use a different SMTP server, you need to supply the information to your SmtpClient object, or since you're using obsoleted classes, SMTPMail object.
Since you are using the obsoleted class, you are stuck without validating credentials I think. Since there is no mechanism for providing a username/password that I could see on MSDN.

If you have access to System.Net.Mail, I would switch over to it.
Nov 11 '08 #12
IIS doesn't "point" to an smtp server. It *HAS* one.

If you want your application to use a different SMTP server, you need to supply the information to your SmtpClient object, or since you're using obsoleted classes, SMTPMail object.
Since you are using the obsoleted class, you are stuck without validating credentials I think. Since there is no mechanism for providing a username/password that I could see on MSDN.

If you have access to System.Net.Mail, I would switch over to it.
OK. it has one but why the value of smtp is not showing up in Virtual SMTP (under IIS) tab. Is there is a command I can run from command prompt that will show me current SMTP host?
Many Thanks!!!!
Nov 12 '08 #13
Plater
7,872 Expert 4TB
Current SMTP is hot IS the virtual one under IIS. its localhost, 127.0.0.1
I don't know what you are asking here.
That service *IS* the smtp server/smtp host
Nov 12 '08 #14
joedeene
583 512MB
I think he wants to know how to use his local SMTP's service by sending e-mails through C#. I don't know if I worded it right, or am on the right track, but I think he needs to know how he can use his SMTP service in his program.

joedeene
Nov 12 '08 #15
Plater
7,872 Expert 4TB
I think he wants to know how to use his local SMTP's service by sending e-mails through C#. I don't know if I worded it right, or am on the right track, but I think he needs to know how he can use his SMTP service in his program.

joedeene
What the OP should have worked then, it defaults to using the localhost (the SMTP server thats built in to IIS)
Nov 12 '08 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: joe215 | last post by:
I want my users to send emails from a Windows app that I am developing in Visual Basic.NET 2003. I found a good example of sending email to a SMTP server using the SmtpMail class. However, using...
2
by: Mr. x | last post by:
Hello, I am sending emails with Hebrew contents. When receiving emails - I cannot see the Hebrew characters (it is not outlook express configuration, because when receiving emails from friends -...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
4
by: aroraamit81 | last post by:
Hi, I am using CDO component to send emails through my ASP page as I am having IIS on windows XP.......... Now the mails goes and gets into mailroot\Queue folder but does not reaches to the...
3
by: John | last post by:
Hi I have a vb.net win form app that runs on a MS Small Business Server 2003 (windows 20003 server + ISA 2000 + exchange 2000). My question is how can I send external emails from the app via...
0
by: bankar.sachin | last post by:
Hello All, I am working on an service application to send an emails from exchange server. I want to use the groups created in the exchange server to send the mail. At present I am using...
2
by: vishalgupta | last post by:
when i use the code : private void Report(int var) { var++; String ToEmail = ""; String FromEmail = ""; String Bdy = ""; ToEmail =...
0
by: sheel331 | last post by:
Hello, I am new to coding in vb.net and have run into an issue with some code that I am looking over. This is a webform that is filled out and once it is filled out, it takes the responses from...
1
by: TD | last post by:
I have the code below under a button on a form. At this point am just testing how to send email from MS Access. Access is installed on a machine running WinXP Pro. I checked the box next to...
2
by: lstanikmas | last post by:
Hi, I'm validating a form with this ASP but receiving some blank email responses; does anyone see anything wrong with it?: function isFormVarExcluded(thisForm, strToCheck) { var strExcludeVars...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...

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.