[英]How do you send an attachment with cdo.message if the file is in use
I am trying to send an email in classic asp site with an attachment. 我试图在带有附件的经典ASP网站中发送电子邮件。 I am recieving the error "The process cannot access the file because it is being used by another process. "
我收到错误消息“该进程无法访问该文件,因为该文件正在被另一个进程使用。”
The file is sitting in a shared folder on the same physical server that is hosting the site. 该文件位于托管该站点的同一台物理服务器上的共享文件夹中。 If I check in computer management on the server I can confirm that a user has it open.
如果我在服务器上签入计算机管理,则可以确认用户已将其打开。
My question then is: Am I able to send a copy of the file that is saved to disk using cdo.message if that file is in use? 然后我的问题是:如果正在使用cdo.message,是否可以发送保存到磁盘的文件副本? I stripped away the rest of my code to do a test and I was still getting the same error using this.
我剥离了其余的代码以进行测试,但使用此命令仍然遇到相同的错误。
'Create the Message Object
Set objMsg = Server.CreateObject("CDO.Message")
'Set the properties of the Message
With objMsg
Set .Configuration = cdoConfig
.From = sFrom
.To = sTo
.Subject = sSubject
.TextBody = sBody
.Send
End With
不,您不能绕过此限制,也不会想要发送损坏的文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.