Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Tutorial] Email Sender - Attachments

[Tutorial] Email Sender - Attachments

Posts 1–6 of 6 · Page 1 of 1
deathninjak0
deathninjak0
[Tutorial] Email Sender - Attachments
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

http://www.virustotal.com/analisis/9...447-1260246592
#1 · edited 16y ago · 16y ago
Bombsaway707
Bombsaway707
Good TUT! Ill look over the code later but from what i see thts a strange way of sending an email but dont listen to me XD
#2 · 16y ago
deathninjak0
deathninjak0
Thank you
#3 · 16y ago
Bombsaway707
Bombsaway707
Oh just realized something, you need a Virus Scan. Get one quick b4 pixie sees!
#4 · 16y ago
CoderNever
CoderNever
Give Credits I saw this on alot of different sites....?
#5 · 16y ago
Zoom
Zoom
Quote Originally Posted by Coder Never View Post
Give Credits I saw this on alot of different sites....?
Yeah I have also seen this!
#6 · 16y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • [HELP]Contact list for email senderBy Pixie in Visual Basic Programming
    12Last post 16y ago
  • [RELEASE]Email Sender with savable contacts!By Pixie in Visual Basic Programming
    14Last post 16y ago
  • NEED HELP CODING EMAIL SENDER!!!By EvoSpider in Visual Basic Programming
    7Last post 15y ago
  • Email SenderBy andrew4699 in Combat Arms Help
    0Last post 16y ago
  • Nexon Email Sender (WEB - NOT DOWNLOAD)By ZenoCoder in Combat Arms Hacks & Cheats
    29Last post 16y ago

Tags for this Thread

None