Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending mail from local Win2K SMTP Server

Status
Not open for further replies.

organicg

Programmer
Oct 21, 2002
151
US
I want to send email from my PC running Windows 2000. IIS with SMTP Virtual Server is running. I've read in my ASP.NET book and the Help files about how it works, but it's not really clear, and it's not working.
In a nutshell, emails that I want to send to real domains, like you@hotmail.com just end up in the 'queue' folder and never get sent. Does someone know how to send emails outside of the local domain? Do I need to set a DNS server or something?
Thanks for the help.
 
Hi,
I am doing exactlly this in my code. My SMTP server is on another domain and nothing special was set up on the remote SMTP server.

Try this code and let me know if you have any problems.

Dim objmm As New MailMessage

'Set the properties
objmm.To = "Bob@yahoo.com"
objmm.From = "Mike@hotmail.com"
objmm.Subject = "Test mail from Mike"
objmm.BodyFormat = MailFormat.Html
objmm.Body = " Hello Bob...."

SmtpMail.SmtpServer = "server ip address"
SmtpMail.Send(objmm)

'Remember to import the following:
Imports System.Web.Mail

Regards,
Mark
 
I do the same thing as you, except I have my local default domain as the SMTPMail.SMTPServer.
Server IP address: the only IP I know of is the dynamically assigned one each time I connect to the internet. I still use a dial-up connection...but not for long.
Still don't know why I can't send email to the rest of the world.
 
Try this:
Code:
SMTPMail.SMTPServer="localhost"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top