+ Reply to Thread
Results 1 to 2 of 2

Thread: VB Email Sender

  1. #1
    VBnet's Avatar
    VBnet is offline Newbie
    Join Date
    May 2009
    Location
    Sweden :D
    Posts
    18
    Rep Power
    11

    Exclamation VB Email Sender

    Hello CodeCallMembers, today i will be showing you how to make a email sender

    You need: 1 Textbox, and 2 Buttons/Command Buttons


    First Step: Drag and drop a button, name it "send", double click it and add:
    Code:
    Dim smtpServer As New SmtpClient()
            Dim mail As New MailMessage()
            smtpServer.Credentials = New Net.NetworkCredential("fertyl5@gmail.com", "fertyl200")
            'using gmail
            smtpServer.Port = 587
            smtpServer.Host = "smtp.gmail.com"
            smtpServer.EnableSsl = True
            mail = New MailMessage()
            mail.From = New MailAddress("fertyl5@gmail.com")
            mail.To.Add("admin@gamerschannel.net")
            mail.Subject = ("change to whatever you want")
            mail.Body = TextBox1.Text
            smtpServer.Send(mail)
            MsgBox("Mail Sent Succesfull!")
    Everything that ive marked with red, you need to change thoose, if i marked Green, it is not necesery.

    You dont need to change "fertyl5@gmail.com" and "fertyl200" because you dont wanna rewrite the code, this is much easier! You can change them if you want!
    "admin@gamerschannel.net", change that to your email, so when they click "send" the info will be sent to you!

    Now to the second button, name it Cancel and add:
    Code:
    Code:
    End
    Then, when you are done with the both buttons, and without no errors
    take a textbox, make it long so pepole can write in it!

    Then take this code:
    Code:
    Code:
    imports system.net.Mail
    put it over

    Code:
    Public Class Form1
    when you have done that, you are done! Reply if you didnt understand, and i wouldnt mind if someone +rep:ed me

    Bye Bye

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    egoist is offline Newbie
    Join Date
    Apr 2010
    Posts
    1
    Rep Power
    0

    Re: VB Email Sender

    How to determine the email to send to and how to determine the subject and its says there is problem in ""smtpServer.Send(mail)
    ""

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. connection between sender and receiver
    By Apprentice123 in forum General Programming
    Replies: 2
    Last Post: 10-23-2010, 03:34 PM
  2. E-mail sender
    By Diastro in forum CSharp Tutorials
    Replies: 0
    Last Post: 08-02-2010, 03:50 PM
  3. How to make a Email Client/Sender
    By haxftw in forum Visual Basic Tutorials
    Replies: 6
    Last Post: 02-12-2010, 01:10 PM
  4. auto login & sender vb6
    By J1990 in forum Visual Basic Programming
    Replies: 6
    Last Post: 06-15-2009, 07:47 AM
  5. C# Key Sender
    By Jordan in forum Classes and Code Snippets
    Replies: 11
    Last Post: 03-02-2009, 05:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts