title: How to Add pdf File as an Attachment to an Email
body: <p>I am dynamically storing each person report as <code>pdf</code> and should send it to them an email <code>Attacment</code>. How do I send it as an attachment to an email. Here is my code.</p>
  
  <pre><code>public void Esendmail(string EmailFrom, string EmailTo, 
                        string EmailBody, string EmailSubject, string EmailCC)
  {
              MailMessage message = new MailMessage();
              message.From = new MailAddress(EmailFrom);
              message.CC.Add(EmailCC);
  
              message.To.Add(new MailAddress(EmailTo));
              message.IsBodyHtml = true;
              message.Body = EmailBody;
              message.Subject = EmailSubject;
  
              SmtpClient client = new SmtpClient();
  
              client.Send(message);
  
   }
  </code></pre>