Solved

email SMTP vb.net window application

Posted on 2006-06-28
4
206 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:mwmiller78
  • 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:mwmiller78
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:mwmiller78
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Merging PDFs with VB.NET 10 31
Setting location of a form 4 22
Expando 4 33
Enable copy and pasting even when textbox is disabled 2 15
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now