Atachment not working with Mailer.PersistsMail in ASP

  • From: "Arnab Ghosh" <arny_gn@xxxxxxxxxxx>
  • To: exchangelist@xxxxxxxxxxxxx
  • Date: Tue, 21 Jun 2005 01:03:48 -0600

I am using an ASP form to enter personal data and a file attachment which
is being sent through an email application. I am using an file type input
in the form to browse & attach a file & the following code for sending
mail:

set mymail=server.CreateObject("Persits.MailSender")
        mymail.Host = "localhost" 
        mymail.From="webteam@xxxxxxxxx"
        mymail.AddAddress "arnabghosh05@xxxxxxxxxxx"
        mymail.Subject="Job Application"
        mymail.AddAttachment request.form("file1")
        mymail.Body=str & str2
        mymail.IsHTML = True
        mymail.Send

file1 is the form element that is sending attached file.
Though I can see the path of the file attached if I response.the file name
but when I am actually sending the mail the following error is being
shown:
System cannot find the file specified.


Other related posts: