Error while sending mail (attachment file)
- by Surya sasidhar
hi,
in my application i am using to send mail with attachments i write the code like this 
Using System.Net.Mail;
MailMessage mail = new MailMessage();
        mail.Body = "<html><body><b> Name Of The Job Seeker: " + txtName.Text + "<br><br>" + "The Mail ID:" + txtEmail.Text + "<br><br>" + " The Mobile Number: " + txtmobile.Text + "<br><br>" + "Position For Applied: " + txtPostionAppl.Text + "<br><br>" + "Description " + txtdescript.Text + "<br><br></b></body></html>";
        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);
it is giving error at attachment like mail.Attachemts.Add(filena)
like this
'System.Collections.ObjectModel.Collection.Add(System.Net.Mail.Attachment)' has some invalid arguments.