Arkadaşar merhaba;
ASP.NET ile kodlanmış bir sitem var ve mevcut domainimi google apps e taşıdığım için maillerime artık Gmail üzerinden erişiyorum. iletişim formunu da GMAİL bilgilerini kullanarak çalışmasını istiyorum.

Utilities.cs dosyasındaki bilgiler şu şekilde. GMAIL smtp bilgilerini nasıl düzenleyebiliriz. Yardım eder misiniz?

public class Utilities
{
    public static bool SendMailNormal(string sMessage, string subject, string mail)
    {




        string html = "";
       // System.Net.Mail.MailMessage eposta = new System.Net.Mail.MailMessage();

        System.Web.Mail.MailMessage eposta = new System.Web.Mail.MailMessage();
        bool isSuccess = false;
        MailAddress gonderen = new MailAddress("abc@deneme.com", " İletişim Formu");

        eposta.From = "abc@deneme.com";
        MailAddress alan = new MailAddress(mail);
        

    

        eposta.To = mail;

        eposta.Cc = mail;

      

        eposta.Subject = subject;

        eposta.BodyFormat = MailFormat.Html;

        eposta.Body = sMessage;

        eposta.Priority = System.Web.Mail.MailPriority.High;

        eposta.Body = sMessage;
        eposta.BodyEncoding = Encoding.UTF8;
      
        
        SmtpMail.SmtpServer = "mail.deneme.com";
        

       // SmtpClient SMTP = new SmtpClient();

        //System.Net.NetworkCredential mailAuthentication = new
        //System.Net.NetworkCredential("info@gmail.com", "xxx");
        //SMTP.UseDefaultCredentials = true;
       //1 SMTP.EnableSsl = true;
        //SMTP.Host = "smtp.gmail.com";
      //  SMTP.Port = 587;
    //    SMTP.Credentials = mailAuthentication;

       

      //  SMTP.SmtpServer = "smtp.gmail.com";//smtp is :smtp.gmail.com

        // - smtp.gmail.com use smtp authentication
       
        eposta.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "0");
        eposta.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "deneme@gmail.com");
        eposta.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "xxx");

        // - smtp.gmail.com use port 465 or 587
        eposta.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "587");//port is: 465

        // - smtp.gmail.com use STARTTLS (some call this SSL)
        eposta.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "false");


        


        try
        {
            SmtpMail.Send(eposta);
            isSuccess = true;
            return isSuccess;
        }
        catch (Exception ex)
        {
            return isSuccess;
        }


    }