Solved

email SMTP vb.net window application

Posted on 2006-06-28
4
212 Views
Last Modified: 2010-04-23
I have a vb.net windows application. I want to be able to send an email using SMTP. How do I do this?
0
Comment
Question by:Mike Miller
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
jtaylor8181 earned 500 total points
ID: 17002465
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
 

Author Comment

by:Mike Miller
ID: 17002559
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
 

Author Comment

by:Mike Miller
ID: 17002781
nevermind, the virus scan was blocking it. i got it. thanks a bunch!
0
 
LVL 4

Expert Comment

by:jtaylor8181
ID: 17002848
no problem, i'm glad that is what you were looking for.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question