static void Quote() { Console.WriteLine("Hello and welcome to the quote fetcher!"); Console.WriteLine("Quote fetched:"); QuoteFetcher qf = new QuoteFetcher(); Quote q = qf.GetQuote(); Console.WriteLine(q.quote); WikipediaFetcher wf = new WikipediaFetcher(); Console.WriteLine(wf.GetWikipediaPage(q.author)); Console.WriteLine("Click >ENTER< to exit..."); Console.ReadLine(); }
static void Email() { Console.WriteLine("Hello and welcome to the quote emailer!"); Console.WriteLine("What is your email?"); string email = Console.ReadLine(); Console.WriteLine("What is your name?"); string name = Console.ReadLine(); QuoteFetcher qf = new QuoteFetcher(); Quote q = qf.GetQuote(); WikipediaFetcher wf = new WikipediaFetcher(); WikiPage wikiPage = wf.GetWikipediaPage(q.author); Console.WriteLine("Adding quote: '" + q.quote + "' to email."); EmailSender.SendEmailWithSmtp(email, name, q, wikiPage); Console.WriteLine("Email sent to " + email); Console.WriteLine("Click >ENTER< to exit..."); Console.ReadLine(); }