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:
Everything that ive marked with red, you need to change thoose, if i marked Green, it is not necesery.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!")
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:
Then, when you are done with the both buttons, and without no errorsCode:End
take a textbox, make it long so pepole can write in it!
Then take this code:
Code:
put it overCode:imports system.net.Mail
when you have done that, you are done! Reply if you didnt understand, and i wouldnt mind if someone +rep:ed meCode:Public Class Form1
Bye Bye![]()
How to determine the email to send to and how to determine the subject and its says there is problem in ""smtpServer.Send(mail)
""
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks