Alankar bhosale

Wednesday, May 13, 2015

Send email using gmail in .net

using System.Net.Mail;
using System.Net;

private void SendMail()
        {
           string sFromAddress = "YourMailId@gmail.com";
           string sToAddress = "ReceiversMailId@xyz.com";
           const string sFromPassword = "YourPassword";
           const string sSubject = "Mail subject";
           const string sBody = "Mail Body";


                SmtpClient smtp = new SmtpClient

               {

                   Host = "smtp.gmail.com", // smtp server address here…

                   Port = 587,

                   EnableSsl = true,

                   DeliveryMethod = SmtpDeliveryMethod.Network,

                   Credentials = new System.Net.NetworkCredential(sFromAddress,            sFromPassword),

                   Timeout = 30000,

               };

                MailMessage mmMessage = new MailMessage(sFromPassword, sToAddress, sSubject, sBody);

                smtp.Send(mmMessage);

}


 

if your mail account is not configured as less secure apps then it might possible that you will get smtpException. 

to avoid it go to the below link 

and configure gmail as shown in below image 

Wednesday, June 20, 2012

How to change web icon in MS Dynamics CRM 2011


Change web icon in MS Dynamics CRM 2011


It is very easy to change web icon (icon appear in address bar and browser tabs).

Go to your CRM web server 

Step 1.  Rename your icon to favicon.ico
Step 2. Open C:\Program Files\Microsoft Dynamics CRM\CRMWeb
Step 3. Replace your icon with current  favicon.ico
Done !!!
it will look like




This is server specific change and will get applied to all CRM organizations on the current server.

Note:
This is unsupported change and may be resetted after installing Roll ups.
I have installed Roll up 6, 7, 8 and it did not get resetted.

Thanks folks,
I hope you will find this post helpful