Showing posts with label Email Templates. Show all posts
Showing posts with label Email Templates. Show all posts

Wednesday, October 21, 2015

LINQPad USE


LINQPad allows you to execute single LINQ commands against an existing EF model, or even to write dot net code in the editor and execute it like a little dynamic dot net environment.  The main application is free, but there is an auto-complete feature to the editor that you must pay in order to activate. Believe me it is worth it to pay for the license, you also support the author and show him the application is worthMONEY .  The license is very inexpensive and well worth the price in order to get intellisense like behavior on your LINQ queries.
The first couple versions I played with worked great with SQL Server, but could not load the VistaDB EF provider.  I was bummed, but at least I could debug my queries against SQL Server, and then run against VistaDB to make sure it worked the same way.  But I recently got an email from the author of LINQPad that it could load VistaDB, in version 2.


Monday, October 19, 2015

Email Templates

Sample
Main program
static void Main(string[] args)
        {
            new Email().Run();
        }


Cs.file

public class Email
    {
       public void Run()
       {
           try
           {
               System.Net.Mail.MailMessage newmsg = new System.Net.Mail.MailMessage();

               newmsg.From = new MailAddress("from address full");

               newmsg.Subject = "Testing2";
               newmsg.To.Add("to address");
               //newmsg.To.Add("choulla.naresh@gmail.com");
               newmsg.Body = "Hellooooo2";
               SmtpClient smtp = new SmtpClient();
               smtp.Host = "host address";
//port number
               smtp.Port = "port number";
               smtp.Credentials = new System.Net.NetworkCredential("username",                      "password");
               //smtp.UseDefaultCredentials = false;
               smtp.EnableSsl = false;
               smtp.Send(newmsg);
           }
           catch(Exception Ex)
           {
               //smtp.Send(msg);
           }
       }

    }