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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mail.mailmessage = "Gone crazy"

Status
Not open for further replies.

StylizIT

Programmer
Joined
Dec 4, 2003
Messages
62
Location
NL
hi guys,
I know it's a stupid subject name but couldn't come up with anything else.

Sending mail with asp.net is discussed over the internet many times.
I searched google, msdn and any forum but couldn't solve this one on my one.

I've got the next code and it should work(or I'm missing something)

mail.SmtpMail.SmtpServer = "localhost"
dim MM as new mail.mailMessage
MM.to = txtto.text
MM.from = txtfrom.text
MM.subject = txtsubject.text
MM.body = txtbody.text
Mail.SmtpMail.Send(MM)

This should work and it does work, because if I give a non-existing servername I get the error that there could not be a connection established with my server

If I change the Relay of the server I get an error.
If I execute the code above nothing happens. I don't get anymore.

Anyone knows a sollution for this problem?

thnx in advance

You can better regret that you have done something than regret the fact you done nothing
 
The mail message is probably sitting in the SMTP mail servers folders on your local machine. When you install IIS on your machien you also get an SMTP server installed. Check that server via the IIS MMC Console.

James :-)

James Culshaw
james@miniaturereview.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top