JMC network
Welcome Guest!
-------------------
Please Register In Our Forum To get Full Access of Our Forum
- If your not registered, you can click the 'register' button at the end of this message..
- If you are already registered, Please login... Use the button at the end of the message..

**Please Take Part in What Keeps Happening Daily In Our Forum**
---
Forum Administrators -
Jake, Majii and Chris!
JMC network
Welcome Guest!
-------------------
Please Register In Our Forum To get Full Access of Our Forum
- If your not registered, you can click the 'register' button at the end of this message..
- If you are already registered, Please login... Use the button at the end of the message..

**Please Take Part in What Keeps Happening Daily In Our Forum**
---
Forum Administrators -
Jake, Majii and Chris!
JMC network
Would you like to react to this message? Create an account in a few clicks or log in to continue.

JMC network

JMC network for all of you
 
HomeHome  JMC ChatJMC Chat  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 How To Create A Mail Sender - Visual Basic 2008

Go down 
AuthorMessage
Ximster
Admin
Admin
Ximster


Posts : 10
Join date : 2009-10-29
Age : 28
Location : The Soul Tombs.....

How To Create A Mail Sender - Visual Basic 2008 Empty
PostSubject: How To Create A Mail Sender - Visual Basic 2008   How To Create A Mail Sender - Visual Basic 2008 I_icon_minitimeFri Oct 30, 2009 7:00 am

This Is A Tutorial On how To Create A Mail Sender On Visual Basic 2008 Express Edition!
---

1. Make a new project and name it whatever you want to...

2. Put Up The Following:
5 Labels
5 Text Boxes
1 Button

3. Name the Labels As Shown Below:
Your E-mail Id
Your Password
To:
Subject:
Body:

4. Multi line The Last Text Box Which Is text Box 5

5. Name the Button As "Send"

6. Click Near The Beginning Of "Public Class Form1"On The Top And Press Enter Once... And On The Line Which Is Emty Type In:
Imports System.Net.Mail

7. Double Click On Button And Enter The code Shown Below:

If TextBox3.Text = "" Then
MsgBox("You Didn't Fill Up The Form Correctly, Please Check Again")
Else
Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient
SmtpServer.Credentials = New Net.NetworkCredential(TextBox1.Text, TextBox2.Text)
SmtpServer.Port = 587
SmtpServer.Host = "smtp.live.com"
SmtpServer.EnableSsl = True
mail.To.Add(TextBox3.Text)
mail.From = New MailAddress(TextBox3.Text)
mail.Subject = TextBox4.Text
mail.Body = TextBox5.Text
SmtpServer.Send(mail)
MsgBox("The Mail Has Been Sent Successfully! " + TextBox3.Text + " Will Recieve The Mail Immediately!")

Note: this Code Will Work If You Placed the text Boxes In Order! And You Can Order It However You Want by Changing The TextBox Names In The Code! So Please Think Before Reply Saying That The Tutorial Doesn't Work!!

-------
Back to top Go down
http://www.jmc-network.tk
 
How To Create A Mail Sender - Visual Basic 2008
Back to top 
Page 1 of 1
 Similar topics
-
» [RATE] >> How To Create A Mail Sender - Visual Basic 2008 | Jake

Permissions in this forum:You cannot reply to topics in this forum
JMC network :: Tutorials :: C++ / C / Visual Basic-
Jump to: