开发者

How do I get the filename of the .msg file when I use specifiedPickupDirectory for my .Net SMTP

I'm trying to keep track of the email created after I "send" it using SmtpClient.Send.

I have it configured to write to a directory by configuring my app.config to use specifiedPickupDirectory.

What I'd like to gain access to is the name of the file that was used开发者_高级运维, so that I can periodically check and make sure that my mail server has retrieved it and sent it along.

Any suggestions?


Perhaps try initially creating the file in a temporary directory. Make sure that it is the only file in the directory. Use Directory.GetFiles to find the file name and save it to a variable. Then move the file to the real directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜