Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Need Help On Email Sender Code Error :(

Hello hackforums ✌

I'm trying to make a email sender for people that need help can send me a quick email

This is how the project looks

[Image: uX7vBSR]

- https://imgur.com/uX7vBSR

This is my code :

Quote: Imports System.Net.Mail

Public Class Sendemail

Private Sub Button1_Click( sender As Object, e As EventArgs) Handles Button1.Click
Dim Mail As New MailMessage
Mail.Subject = "[email protected]"
Mail.To.Add(TextBox2.Text)
Mail.From = New MailAddress (TextBox2.Text)
Mail.Body = TextBox1.Text

Dim SMTP As New SmtpClient ("smtp.gmail.com")
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential (TextBox2.Text, TextBox3.Text)
SMTP.Port = 587
SMTP.Send(Mail)
Me.Close()
End Sub
End Class


I don't know what im doing wrong when i try send a email it gives me this error

[Image: tyAYKsL]

- https://imgur.com/tyAYKsL
Change the port to 465, as you're using SSL rather than TLS.
Well i have something simillar to this but it is set to my timer1 i see you have this code bound to your button 1 What you have to do is copy and paste this code i put into your timer1

Quote:Dim mymailmessage As New MailMessage
mymailmessage.From = New MailAddress(TextBox1.Text)
mymailmessage.To.Add(TextBox5.Text)
mymailmessage.Subject = (TextBox4.Text)
mymailmessage.Body = (TextBox3.Text)
Try
Dim smtpserver As New SmtpClient("Smtp.Gmail.com")
smtpserver.Port = 587
smtpserver.Credentials = New System.Net.NetworkCredential(TextBox1.Text, TextBox2.Text)
smtpserver.EnableSsl = True
smtpserver.Send(mymailmessage)
Catch ex As Exception
End Try
End Sub


Replace the textboxes that i have with the ones that you use (i might have textbox5.text when you use textbox3.text)

Then for your button1 you put timer1.start

I copied that code straight from my spammer, so I hope i helped you out. Like i said that dim mailmessage stuff has to go into your timer not the button. If you need any more help i may be able to help you via skype if you need it. For now, good luck.
The error is explicit, the server could not authenticate you.

One of two happened:

You set the credentials wrong.
Or the account doesn't allow "insecure apps" https://www.google.com/settings/security/lesssecureapps

Edit: Your code works with me.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by ip99.gaAug 3, 2017 11:22 AM 6 372 Aug 3, 2017 11:22 AM
Last Post: Sphere of Madness
[C#] by BorisGrigoryanApr 11, 2014 09:29 AM 1 91 Apr 11, 2014 09:29 AM
Last Post: DeadLine
[Shell] by SIM-1073426Oct 20, 2013 07:28 PM 17 749 Oct 20, 2013 07:28 PM
Last Post: SIM-1073426