Solved

email SMTP vb.net window application

Posted on 2006-06-28
4
207 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

23 Experts available now in Live!

Get 1:1 Help Now