0

hi..
i'm trying to send mail from my website using GMAIL account. But after i use it, my website running very slow (for about 20-30second). Do u have solution to make it faster?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by kieky
0

Can you post specifics how you are sending email to gmail. I mean any email component etc what are you using.

0

thx for your replay..
this is my code :

private void SendingNotification(int IdDocument, string EmailDestination)
    {
        MailMessage message = new MailMessage();
        SmtpClient smtpClient = new SmtpClient();
        string link = "<a href=mailto:http://localhost:1143/DMS.Web/Staf/TampilPermission.aspx?id_document=" + IdDocument + ">View Comment</a>";
        try
        {
            message.To.Add(new MailAddress(EmailDestination));
            message.From = new MailAddress("simplify.fmipa@gmail.com");
            message.Subject = "Kieky mengomentari sebuah topik" ;
            message.IsBodyHtml = true;
            message.Body = "kieky mengomentari sebuah topik milik edvan.<br/><br/>Lihat Dokumen :<br/>" + link;
            smtpClient.Host = "smtp.gmail.com";
            smtpClient.Port = 587;
            smtpClient.EnableSsl = true;
            smtpClient.UseDefaultCredentials = true;
            smtpClient.Credentials = new System.Net.NetworkCredential("simplify.fmipa@gmail.com", "@Bouv1er@");

            smtpClient.Send(message);
            Label_Message.Text = "Mail sent successfully";
        }
        catch (Exception ex)
        {
            Label_Message.Text = "Error occured, info : " + ex.Message;
        }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.