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.
精彩评论