0
votes

I am working on an application (in Delphi XE8) that amongst other things allows the user to send emails. The solution I have chosen is to simply save the email as a text file with a "From:" and "To:" field in a SMTP pickup directory, which has worked fine up to now. I use a SMTP virtual server set up in IIS 6.

However, a new requirement is to be able to choose the sending time of the email. Is there some way I can specify this through the text file, or is this only possibly by changing the IIS settings? I would be very grateful for any tips that anyone may have.

2
afaik IIS is not a mail server. Are you using Exchange?mjn
Hi @mjn, no, I'm not using Exchange. I set up a SMTP virtual server using IIS on my server machine. Sorry for being unclear, I'll edit my question.MrKiloByte
I don't think such feature exists in IIS6. You might want to save the files to other directory and make a dedicated pickup service move them to the SMTP pickup directory based on your timing. your time info could be a header in that text file which your pickup service will remove before moving it to the SMTP pickup directory.kobik
@kobik, yes, that could also be an alternative. I'll look into it, thanks for your reply!MrKiloByte

2 Answers

1
votes

If your code can detect the From And To fields correctly, why not just add a Time: entry in your text file and skip that file if the time has not been reached?

0
votes

Try using IMAP4 (standard protocol for service-based handling of mails and folders for a mail client) instead of SMTP. Then use an email client that supports postponing of sending messages, and use its scripting to configure message sending the way you want it.

If your program continues running till send time, you could also create a thread that waits till the time you want the message sent, but I suppose that is too simple :)