Solved

email SMTP vb.net window application

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

734 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