Results 1 to 6 of 6
  1. #1
    apezwijn's Avatar
    Join Date
    Feb 2007
    Gender
    male
    Location
    The Netherlands
    Posts
    1,525
    Reputation
    22
    Thanks
    682

    Exclamation [Easy][VB2008 Tutorial, Beginner friendly] Sending a Email using SMTP

    == 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.

  2. The Following 2 Users Say Thank You to apezwijn For This Useful Post:

    pedrobester (09-17-2008),punkbuster!123 (10-19-2008)

  3. #2
    Dead Bones Brook's Avatar
    Join Date
    Sep 2008
    Gender
    female
    Location
    On that seat right over there.
    Posts
    8,328
    Reputation
    858
    Thanks
    1,533
    My Mood
    Daring
    wat is SMTP en wat is het nut om een email via dat te verzenden? :O

  4. #3
    apezwijn's Avatar
    Join Date
    Feb 2007
    Gender
    male
    Location
    The Netherlands
    Posts
    1,525
    Reputation
    22
    Thanks
    682
    Quote Originally Posted by Dead Bones Brook View Post
    wat is SMTP en wat is het nut om een email via dat te verzenden? :O
    Talk english on these forums

    Translation:
    What is SMTP en whats the use to use it to send emails,

    Awnser:
    SMTP = Simple Mail Transfer Protocol

    More info: Simple Mail Transfer Protocol - Wikipedia, the free encyclopedia
    Wikipedia

  5. #4
    rwkeith's Avatar
    Join Date
    Jul 2008
    Gender
    male
    Posts
    457
    Reputation
    11
    Thanks
    79
    My Mood
    Angelic
    Nice tut but what would be better is if you explained the parts of the source code a little
    Goals In Life:
    [X] Become an Advanced Member
    [X]Release a tut on mpgh
    [0]Post 300 posts
    [X]Make a working hack
    [X] Learn c++

  6. #5
    pedrobester's Avatar
    Join Date
    Jun 2008
    Posts
    1
    Reputation
    10
    Thanks
    0
    Tnx a lot this work very fine!!!

    but u need to the explain parts of source code... but nice onde good job!!

  7. #6
    Sjoerd's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Location
    Aurora Borealis
    Posts
    16,918
    Reputation
    1272
    Thanks
    2,097
    My Mood
    Hot
    Quote Originally Posted by Dead Bones Brook View Post
    wat is SMTP en wat is het nut om een email via dat te verzenden? :O
    wow a real nab using dutch in a english forum :@

    lol ty for the tut







Similar Threads

  1. [Preview] So my friend Sended Me....
    By yoda23456 in forum Call of Duty Modern Warfare 2 Discussions
    Replies: 8
    Last Post: 05-24-2011, 06:41 AM
  2. How can I have someone send a email to mine?
    By o0OpurezO0o in forum Visual Basic Programming
    Replies: 26
    Last Post: 01-02-2011, 02:55 PM
  3. [Tutorial] Easy Camo Tutorial
    By Hysteria in forum Combat Arms Mod Tutorials
    Replies: 15
    Last Post: 12-17-2010, 06:07 PM
  4. Replies: 1
    Last Post: 06-06-2009, 02:50 AM
  5. need easy walkthrough tutorials for c++
    By true1playa in forum Programming Tutorial Requests
    Replies: 13
    Last Post: 08-29-2008, 09:44 AM

Tags for this Thread