First off the credits go to my friend for most of the code in attachments, codenstuff. And youtube for the email sender.
SMTP email account is needed to use this application.

To make the email sender you will need the following on your forms and the code included:
*Form1 - 4 Textboxes
*Form1 - 3 Buttons
*Form1 - 3 Labels
*Form1 - 1 Checkbox / 1 openfiledialog control
*Form2 - 4 Textboxes
*Form2 - 4 Labels / 1 Button
THE CODE FOR THIS PROGRAM:
FORM1......
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
'Used to select file for attachment
OpenFileDialog1.ShowDialog()
TextBox4.Text = OpenFileDialog1.FileName
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'Gets the user settings for email server
Button2.Enabled = False
Dim froma AsString
Dim Serv AsString
Dim user AsString
Dim pword AsString
froma = Convert.ToString(My.Settings.From)
Serv = Convert.ToString(My.Settings.server)
user = Convert.ToString(My.Settings.uname)
pword = Convert.ToString(My.Settings.pass)
'Sends the email and attachment
Dim from As New MailAddress(froma)
Dim [to] As New MailAddress(Me.TextBox1.Text)
Dim theMailMessage As New MailMessage(from, [to])
Dim filez = TextBox4.Text
theMailMessage.Body = Me.TextBox3.Text
If CheckBox1.Checked Then
theMailMessage.Attachments.Add(New Attachment(filez))
End If
theMailMessage.Subject = TextBox2.Text
Dim theClient As New SmtpClient(Serv)
theClient.UseDefaultCredentials = False
Dim theCredential As New System.Net.NetworkCredential(user, pword)
theClient.Credentials = theCredential
theClient.EnableSsl = True
Try
theClient.Send(theMailMessage)
Catch wex As Net.WebException
MessageBox.Show("Could not send email...check your settings.")
End Try
Button2.Enabled = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'Opens the settings form
Dim theSecondForm As New Form2()
theSecondForm.ShowDialog()
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
'Controls attachment box
If CheckBox1.Checked Then
Button1.Enabled = True
TextBox4.Enabled = True
Else
Button1.Enabled = False
TextBox4.Enabled = False
End If
End Sub
End Class
CODE FOR FORM2....
Code:
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Saves settings and closes form
My.Settings.From = TextBox1.Text
My.Settings.server = TextBox2.Text
My.Settings.uname = TextBox3.Text
My.Settings.pass = TextBox4.Text
My.Settings.Save()
Me.Close()
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Loads the settings into the form when it is opened
Dim froma AsString
Dim Serv AsString
Dim user AsString
Dim pword AsString
froma = Convert.ToString(My.Settings.From)
TextBox1.Text = froma
Serv = Convert.ToString(My.Settings.server)
TextBox2.Text = Serv
user = Convert.ToString(My.Settings.uname)
TextBox3.Text = user
pword = Convert.ToString(My.Settings.pass)
TextBox4.Text = pword
End Sub
End Class
Lastly, go to MyProject>Settings> and fill out the information

https://www.virustotal.com/analisis/9...447-1260246592