using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net.Mail; using System.Net; using System.Web; namespace EmailSender { class Program { static void Main(string[] args) { string username, password; int n; Console.Write("Welcome to Saturn Email Spammer\n********************************************************************************"); Console.WriteLine("To: "); string to = Console.ReadLine(); Console.WriteLine("Subject: "); string sub = Console.ReadLine(); Console.WriteLine("Body: "); string body = Console.ReadLine(); Console.WriteLine("How many times do you want to send this message?"); n=int.Parse(Console.ReadLine()); Console.WriteLine("Your Live Email Username:"); username = Console.ReadLine(); Console.WriteLine("Your Live Email Password:"); password = Console.ReadLine(); try { for (int i = 0; i < n; i++) { MailMessage MyMessage = new MailMessage(); MyMessage.To.Add(to); MyMessage.Subject = sub; MyMessage.From = new MailAddress("anonymouse@anonymouse.com"); MyMessage.IsBodyHtml = true; MyMessage.Body = body; SmtpClient smtp = new SmtpClient("smtp.live.com"); smtp.EnableSsl = true; smtp.Host = "smtp.live.com"; smtp.UseDefaultCredentials = false; smtp.Port = 25; NetworkCredential credential = new NetworkCredential(username, password); smtp.Credentials = credential; smtp.Send(MyMessage); Console.WriteLine("Message Sent !!!"); } } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine(e.Source); Console.WriteLine(e.GetType()); Console.WriteLine("Message not sent"); Console.ReadKey(); Environment.Exit(0); } Console.WriteLine("Sending messages ended"); Console.ReadKey(); } } }