简体   繁体   English

将表格和附件一起发送到Classic ASP中的电子邮件

[英]send form and attachment together to email in Classic ASP

I need to support an old ASP website, and this is the what I need to create: 我需要支持一个旧的ASP网站,这就是我需要创建的内容:

I need to create a form like name, telephone number and email. 我需要创建一个名称,电话号码和电子邮件之类的表格。 User also able to upload PDF attachment if theyt wanted to . 用户也可以上传PDF附件。 When user click submit, the form detail with the attachment will be send to a specified email straight away. 当用户单击提交时,带有附件的表单详细信息将立即发送到指定的电子邮件。

So far: 至今:

I am able to create a form and submit to email in ASP I am able to upload files to server. 我可以创建一个表单并提交到ASP中的电子邮件,我可以将文件上传到服务器。

The issue is I cannot send form and attachment together in an email. 问题是我无法通过电子邮件一起发送表格和附件。

P/S: is this code in the link work for my case: P / S:链接中的这段代码是否适合我的情况:

Upload file to server, then attach to email and send in asp 将文件上传到服务器,然后附加到电子邮件并发送asp

I believe the code in the link you posted is exactly what you are looking for assuming you're using CDO to send your email. 我相信您发布的链接中的代码正是您在使用CDO发送电子邮件时所要寻找的。 You would just have to also know the file location where the uploaded file has been stored so you can put that in the AddAttachment call. 您只需要知道上传文件的存储位置,就可以将其放入AddAttachment调用中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM