Send email works locally, but not from remote server
<p>I am attending to send email via the following function and while it works fine when I run it from the local server, it fails when I run it remotely. What might be causing this problem?</p>

<pre><code>private void SendEmail()
{
    try
    {
     MailMessage message = new MailMessage();
     SmtpClient client = new SmtpClient("smtp.gmail.com",587);
     client.UseDefaultCredentials = false;
     client.Credentials = loginInfo;
     NetworkCredential loginInfo = new NetworkCredential("xx@gmail.com", "xxxx");
     message.From = new MailAddress("xx@gmail.com", "xx");
     message.To.Add(new MailAddress("yyy@zzz.ac.in","Mail"));
     message.IsBodyHtml = true ;
     string emailContent = "ICHE 2010 - Abstract Received &lt;br&gt;&lt;br&gt;Title: " + Abstract_Title.Text + "&lt;br&gt;&lt;br&gt;Author: " + TxtAuthor_FirstName.Text + "_" + TxtAuthor_LastName.Text + "&lt;br&gt;&lt;br&gt;Abstract in pdf format attached with this email. &lt;br&gt;&lt;br&gt; ICHE2010 Website";
     message.Body = emailContent;
     message.Subject = "ICHE 2010 - Abstract Received";
     string FileName = Server.MapPath(Request.ApplicationPath + "\\AbstractPdfs" + "\\" + abstractBO.AbstractFileNameWithTicks);
     Attachment attachmentpdf = new System.Net.Mail.Attachment(FileName);
     message.Attachments.Add(attachmentpdf);
     client.EnableSsl = true;
     client.Send(message);
    }
    catch (SmtpException smtpex)
    {
     throw smtpex;
    }
    catch (Exception ex)
    {
     throw ex;
    }
}
</code></pre>
