Mail Attachment ASP.Net

Results 1 to 2 of 2

Thread: Mail Attachment ASP.Net

  1. #1
    Join Date
    Dec 1969

    Default Mail Attachment ASP.Net

    Hi,<BR>I am having a simple mail sending interface with option for attaching files. I&#039;m using ASp .Net Web.Mail namespace. I have created the MailAttachment object and specified the constructor as follows:<BR><BR>MailAttachment mAtt = new MailAttachment(Server.MapPath(Request.ApplicationP ath)+ "\" + strAttachedFile);<BR><BR>Where strAttachedFile is the stripped down file name extracted from the fileupload control.<BR>But the following error is ocurring: Invalid mail attachment.<BR>Any ideas what is the flaw?<BR>Thnx.<BR>Abhra<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Mail Attachment ASP.Net

    Not sure if this will help or not but you need to upload the file attachemnt to the server first then attach it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts