Solved

email SMTP vb.net window application

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb. Net application freezes 9 45
Regex validation 2 24
cannot connect to sqlserver 8 25
Calculate number of nights between two dates 5 18
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

806 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