== Things Needed ==
Visual Studio/Basics 2008
1 Gmail account (https://gmail.com)
The preformance of not just copy pasting.
== Quick Explenation ==
I got this code from youtube, youtube is also a good source to learn visual bisics these days.
I understand this code if you have some 'simple questions' (not like you gonna test me or whatever if your bored, i mean just real meant qustions) just ask them.
== Start of Tutorial ==
Create a new visual basics project in vb2008.
'File> New Project (ctrl + N)'
select 'Windows Form Application'
Im naming my project 'SMTP Emailer'
Create a label and change the 'text' to 'Subject', screenshot:
Making a label:
Changing label text:
Now create 2TextBoxes
Creating a TextBox:
Select the second TextBox and press the litle black icon and select 'Multi line'
Enabling Multi Line:
Go to TextBox2 Properties (the TextBox we just added multiline too)
Click on the textbox and then look at the right side,
Give Scrolls the value of Vertical.
Giving a TextBox a vertical scroll:
Add a Button, go to the properties and change the text to 'Send'
Adding a button:
Your form should form should look something like this:
1 Label
2 TextBoxes
1 Button
== Next ==
Now double click button1 and add the following code lines:
Code:
Dim MyMailMsg As New MailMessage
Try
MyMailMsg.From = New MailAddress("smtplogger@gmail.com")
MyMailMsg.To.Add("i.aint.on.drugs@gmail.com")
MyMailMsg.Subject = TextBox1.Text
MyMailMsg.Body = TextBox2.Text
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.Port = 587
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("smtplogger@gmail.com", "apenenu12")
SMTP.Send(MyMailMsg)
TextBox2.Text = ""
MsgBox("Your email has been succesfully send, created by Apezwijn", MsgBoxStyle.Information, "Succes!")
Catch ex As Exception
End Try
Your not done yet!
Add the top of your code, abouve 'Public Class Form1' add this code line:
Code:
Imports System.Net.Mail
Almost Done!
Go to 'File>Save All (ctrl + shift + s)'
Save it.
Then go 'Build>Build SMTP Emailer'
It says Build SMTP Emailer cos my project name is SMTP Emailer.
Tutorial Created by Apezwijn
Credits: Apezwijn
You have my premission to post this tut anywhere else with my credits.