Using System.Net.Mail vb08 help me pl@kz?!

Posts 12 of 2 · Page 1 of 1
Using System.Net.Mail vb08 help me pl@kz?!
I was hoping somebody could explain to me how I could use system.net.mail to send strings to an email? I'm trying to phish my cousin lol. Any help or explainations are very much appreciated!
This is custom code so idk if thats what you are looking for. this can send emails to people O.o

Code:
Imports System.Net.Mail
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'strings
        Dim smtpserver As New SmtpClient
        Dim mail As New MailMessage
        Dim username As String
        Dim password As String
        'username/password
        password = TextBox3.Text
        username = TextBox2.Text
        '@hotmail.com
        If ComboBox1.Text = "@hotmail.com" Then
            smtpserver.Credentials = New Net.NetworkCredential(username + ComboBox1.Text, password)
            smtpserver.Host = "smtp.live.com"
            smtpserver.Port = 25
            smtpserver.EnableSsl = True
            mail = New MailMessage
            mail.From = New MailAddress(username + ComboBox1.Text)
        End If
        If ComboBox1.Text = "@live.com" Then
            smtpserver.Credentials = New Net.NetworkCredential(username + ComboBox1.Text, password)
            smtpserver.Host = "smtp.live.com"
            smtpserver.Port = 25
            smtpserver.EnableSsl = True
            mail = New MailMessage
            mail.From = New MailAddress(username + ComboBox1.Text)
        End If
        If ComboBox1.Text = "@Gmail.com" Then
            smtpserver.Credentials = New Net.NetworkCredential(username + ComboBox1.Text, password)
            smtpserver.Host = "smtp.Gmail.com"
            smtpserver.Port = 587
            smtpserver.EnableSsl = True
            mail = New MailMessage
            mail.From = New MailAddress(username + ComboBox1.Text)
        End If
        mail.To.Add(TextBox5.Text)
        mail.Subject = TextBox4.Text
        mail.Body = TextBox1.Text
        smtpserver.Send(mail)
        'Msgbox
        MsgBox("Mail Sent")
end sub
end class
Posts 12 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?