daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest May 27th, 2018 204 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Net.Mail;
  6. using System.Net;
  7.  
  8. namespace ConsoleApplication2
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             var client = new SmtpClient("smtp.gmail.com", 587)
  15.             {
  16.                 Credentials = new NetworkCredential("myusername@gmail.com", "mypwd"),
  17.                 EnableSsl = true
  18.             };
  19.             client.Send("myusername@gmail.com", "myusername@gmail.com", "test", "testbody");
  20.             Console.WriteLine("Sent");
  21.             Console.ReadLine();
  22.         }
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top