Pages

Monday, November 29, 2010

BE THANKFUL

Be thankful that you don't already have everything you desire. If you did, what would there be to look forward to?
Be thankful when you don't know something, for it gives you the opportunity to learn.
Be thankful for the difficult times. During those times you grow.
Be thankful for your limitations, because they give you opportunities for improvement.
Be thankful for your mistakes. They will teach you valuable lessons.
Be thankful when you're tired and weary, because it means you've made a difference.
It's easy to be thankful for the good things.
A life of rich fulfillment comes to those who are also thankful for the setbacks.
Find a way to be thankful for your troubles, and they can become your blessings.

Thursday, November 18, 2010

Rohan Patel: Can You Do This

Rohan Patel: Can You Do This

Can You Do This

ગુજરાતી એટલે

 G :- ગજબ. 
U :- અલ્ટિમેટ. 
J :- જક્કાસ. 
A :- એકયુરેટ. 
R :- રાપ્ચિક. 
A :- એડવાન્સ. 
T :- ટકાટક. 
I :- ઈન્ટેલીજન્ટ.

Monday, November 15, 2010

Thoughts

Happiness is when what you think, what
you say, and what you do are in harmony.
Faith is not something to grasp; it is a state to grow into.
Faith is the function of the heart.
Prayer is not an old woman’s idle amusement.
Properly understood and applied, it is the most potent instrument of action.
Prayer is not asking.  It is a longing of the soul.

Sunday, November 14, 2010

Email Send in Asp.net

public  void sendMail(string to, string from, string subject, string body)
    {
        ///Smtp config
        SmtpClient client = new SmtpClient("smtp.gmail.com", 465);
        // Edit password and username
        client.Credentials = new NetworkCredential("emailid@gmail.com", "password");
        client.EnableSsl = true;
        ///mail details
        MailMessage msg = new MailMessage();
        try
        {
            msg.From = new MailAddress(from);
            msg.To.Add(to);
            // msg.SubjectEncoding = System.Text.Encoding.UTF8;
            msg.Subject = subject;
            //msg.CC.Add();
            msg.IsBodyHtml = true;
            msg.BodyEncoding = System.Text.Encoding.UTF8;
            msg.Body = body;
            msg.Priority = MailPriority.Normal;
           client.Send(msg);
        }
        catch (Exception exp)
        {
            ///This runs the backup plan
            SendMailAlt(to, from, subject, body);
        }
    }
    private static void SendMailAlt(string to, string from, string subject, string body)
    {
        System.Web.Mail.MailMessage Mail = new System.Web.Mail.MailMessage();
        Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"] = ("smtp.gmail.com");
        Mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2;
        Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = "465";
        Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpusessl"] = "true";
        Mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;
        // Edit username & password
        Mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "emailid@gmail.com";
        Mail.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "password";
        Mail.To = to;
        Mail.From = from;
        Mail.Subject = subject;
        Mail.Body = body;
        Mail.BodyFormat = System.Web.Mail.MailFormat.Html;
        System.Web.Mail.SmtpMail.SmtpServer = "smtp.gmail.com";
        System.Web.Mail.SmtpMail.Send(Mail);
    }



protected void btnsend_Click(object sender, EventArgs e)
    {
        string fromEmail = "emailid@gmail.com";  // from email id
        string subject = txtbody.Text;
        sendMail(txttoemailaddress.Text, fromEmail.ToString(), subject.ToString(), txtmessage.Text);
    }


Saturday, November 13, 2010