-2

This is my first time making a website.

On the website I have made a form for client to fill in their details. It uses the CDO.Message and smtpserver (gmail) and the details can be sent successfully to my email.

Now I want to add a function to allow client to attach file(s) and send the files with the form to my email.

Can I do this without having the attachment(s) being uploaded to the server? I want the details on the form and the attachment(s) being sent directly to email.

Is it possible to use the AddAttachment function, get the file path on client's machine and send the attachment to email? If so how to get the full file path on client's machine?

Thanks a lot.

JohnFx
  • 34,542
  • 18
  • 104
  • 162
Chun
  • 1
  • 1

1 Answers1

1

No. The file will have to be on the server to use that method to add it to the e-mail.If you do this, be very careful because it is a high security risk to allow users to upload files to the file system of a web server.

JohnFx
  • 34,542
  • 18
  • 104
  • 162
  • Thanks for your reply. So is there any other method to send attachment without uploading to server? – Chun Sep 17 '14 at 04:48
  • I won't say there is no other method, but I never found one. If there is it will probably require using another library with more flexible options. – JohnFx Sep 17 '14 at 12:25