Hi rajesh! As soon i got ur mail i started working asap. Plz try the following: In your web application project goto: Project->Add Reference In the add reference dialog box select System.web.dll click select and ok to close the dialog now use the namespace System.web.Mail imports System.Web.Mail now write the code as following: Dim Message As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage Message.From = "<To be configured>" 'SEE NOTES BELOW Message.Subject = "Sub" Message.Body = "Hi to myself!" SmtpMail.SmtpServer = "<To be configured>" 'SEE NOTES BELOW SmtpMail.Send(Message) ----------------------------------------------------- Now Goto Control Panel and select Administrative Tools-> Internet Information Services Now expand the Web Sites Node and right click on the Default Website (or the website u r hosting) and Rightclick and select All Tasks->Configure Server Extensions. Now click on Next and ull see a dialog box Titled Mail Server. NOW COPY THE TEXT IN THE TEXTBOX THAT SAYS "Who should appear as author of the mail that this web server sends. This should be the text in the Message.From property. NOW COPY THE TEXT IN THE TEXTBOX THAT SAYS "The smtp mail server should this web server use to send messages." This should be the text in the SmtpMail.SmtpServer property If this method fails then put the SmtpMail.SmtpServer property to empty string that would cause the server to use the default mail server. Even if this fails then i guess we have a problem in here! First make sure ur mail server is configured by the System administrator. If ur Server Extensions configuration shows empty strings in the server textbox then it is not configured properly.Plz configure it before u try this out! If all this fails i can give u samples to send mail using outlook express objects but remember I NEVER KNOW OF ANY WEB APPLICATION USE THIS METHOD TO SEND MAIL USING OUTLOOK OBJECTS its probably not at all recommended! |