Hi,
I have a mailing form where the details of a person can be entered & mailed. I am also using a file input where a text file can be sent through as attachment. The following code is used to send the mail and the attachment:
attachmt=request.form("file1")
response.write attachmt
set mymail=server.CreateObject("Persits.MailSender")
mymail.Host = "localhost"
mymail.From="
[email protected]"
mymail.AddAddress "
[email protected]"
mymail.Subject="Job Application"
mymail.AddAttachment request.form("file1")
mymail.Body=str & str2
mymail.IsHTML = True
mymail.Send
here str & str2 are the texts received as request.form from the mailing form and I have used a variable as well as directly accessed the attachment using request.form.
The following error is showing when I am trying to send the mail:
System cannot find the file specified.
Though I am attaching a file that exists in the system.
Kindly help me if there is any mistake in my syntax or if there is any better way to attach files and sent through mail.