使用 smtp 客户端发送电子邮件,附件出现错误
我正在发送附件,并且电子邮件发送成功,但是当我尝试删除同一文件时,它给出错误“文件正在被另一个进程使用” 我正在通过 system.io.file.delete() 删除
i am sending an attachement, and the email sends successfuly , but when i tries to delete the same file it gives the error as "file is being used by another process"
i am deleting by system.io.file.delete()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您
处置
正确吗?对于发送邮件后的Stream
和SmtpClient
?Did you
Dispose
correctly? For both theStream
and theSmtpClient
after sending the mail?