Error while sending mail (attachment file)
<p>in my application i am using to send mail with attachments i write the code like this </p>

<p>Using System.Net.Mail;</p>

<p>MailMessage mail = new MailMessage();</p>

<pre><code>        mail.Body = "&lt;html&gt;&lt;body&gt;&lt;b&gt; Name Of The Job Seeker: " + txtName.Text + "&lt;br&gt;&lt;br&gt;" + "The Mail ID:" + txtEmail.Text + "&lt;br&gt;&lt;br&gt;" + " The Mobile Number: " + txtmobile.Text + "&lt;br&gt;&lt;br&gt;" + "Position For Applied: " + txtPostionAppl.Text + "&lt;br&gt;&lt;br&gt;" + "Description " + txtdescript.Text + "&lt;br&gt;&lt;br&gt;&lt;/b&gt;&lt;/body&gt;&lt;/html&gt;";
        mail.From = new MailAddress ( txtEmail.Text);
        mail.To .Add (new MailAddress ( mailid));
        mail.Priority = MailPriority.High;        
        FileUpload1.PostedFile.SaveAs("~/Resume/" + FileUpload1.FileName);
        mail.Attachments.Add(filenme);            
        SmtpMail sm = new SmtpMail();

         sm.Send(mail);
</code></pre>

<p>it is giving error at attachment like mail.Attachemts.Add(filena)</p>

<p>like this</p>

<p>'System.Collections.ObjectModel.Collection.Add(System.Net.Mail.Attachment)' has some invalid arguments.</p>
