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
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