• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

email SMTP vb.net window application

I have a vb.net windows application. I want to be able to send an email using SMTP. How do I do this?
0
Mike Miller
Asked:
Mike Miller
  • 2
  • 2
1 Solution
 
jtaylor8181Commented:
Is this want you wanted?

Dim msg As New System.Net.Mail.MailMessage(from address, to address, subject, message)
Dim mailClient As New System.Net.Mail.SmtpClient(host) ' or (host, port)
mailClient.Send(msg)
msg.Dispose()

jtaylor
0
 
Mike MillerSoftware EngineerAuthor Commented:
Dim mailClient As New System.Net.Mail.SmtpClient(host) ' or (host, port)

can host be an ip address?
I'm getting 'failure sending outgoing message'
0
 
Mike MillerSoftware EngineerAuthor Commented:
nevermind, the virus scan was blocking it. i got it. thanks a bunch!
0
 
jtaylor8181Commented:
no problem, i'm glad that is what you were looking for.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now