How can I send an email though VB.NET?
I'm looking at System.Web.Mail right now but I can't figure anything out.
Printable View
How can I send an email though VB.NET?
I'm looking at System.Web.Mail right now but I can't figure anything out.
well..i got this to work
VB Code:
Imports System.Web.Mail . . . Dim newmsg As New MailMessage newmsg.To = "[email protected]" newmsg.From = "[email protected]" newmsg.Body = "testing123" ' i started to use the lines above..then found the line below...should work all on its own System.Web.Mail.SmtpMail.Send(newmsg.From, newmsg.To, "subject", newmsg.Body)
but I think you can just use the system.web.mail.smtpmail.send
you might need to do something with:
system.Web.Mail.SmtpMail.SmtpServer
to set the mail server..i didnt need to but...
That's how I tried doing it at first but it just freezes.
Try to catch any expected error !! I was trying to send email from my machine but with no luck .I had to use free smtp server !Quote:
Originally posted by JesusFreak
That's how I tried doing it at first but it just freezes.
are you behind a firewall? or anything odd?
Antivirus software?
strange...it worked fine for me.
I have Norton Internet Security(Includes Antivirus and Firewall).
Were can I get a free smpt sever?
try another way of sending emails
Sending Mail in VB.NET using Sockets
There is also a SMTP available inside Win2K. When you install IIS you can check on the SMTP option.
I need one for XP ?? Is it dll or whatever it is ??
You need to know where it is? It's packaged with the OS.
Open the Control Panel, Add/Remove Programs, Add/Remove Windows Components, Internet Information Services (IIS), Details button, and check on SMTP Service.
Quote:Code:Dim m As New SocketMail("what do I put here?", 25)