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

JMC network for all of you
 
HomeHome  JMC ChatJMC Chat  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 How To Create A Mail Sender - Visual Basic 2008

View previous topic View next topic Go down 
AuthorMessage
Ximster
Admin
Admin


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

PostSubject: How To Create A Mail Sender - Visual Basic 2008   Fri 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
View user profile http://www.jmc-network.tk
 
How To Create A Mail Sender - Visual Basic 2008
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Visual Basic
» Some very basic tips from a new user
» How To Create Clickable Links
» CAROL- I RECEIVED E MAIL FROM TOM VIA CARINGBRIDGE
» Basic "tabletop" for Mordheim

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