Format to include attachment in SendMail C#
<p>I'm not sure how to add an attachment to my SendMail function. Lets say i want to add "C:\test.pdf" as an attachment to my email, how do i add this from the SendMail function?</p>

<p>My User Side Code:</p>

<pre><code>string attachment = "c:\test.pdf";

objEmail.SendMail(EmailTo, EmailFrom, Subject, "", attachment, System.Net.Mail.MailPriority.High, "", "", true);
</code></pre>

<p>Function Code:</p>

<pre><code>public void SendMail(string mailTo, string mailFrom, string mailSubject, string mailBody, string[] mailAttachment, System.Net.Mail.MailPriority mailImportance, string mailCC, string mailBCC, bool mailBodyType)
</code></pre>
