バッチごとに実行する一括メール機能を実行するWindows サービスをセットアップしました。
サービスは、スケジュール中に DB から 1 つのバッチをフェッチし、各バッチの後に 20 秒の遅延を与えました。
これにより、メールがスパムまたはバルクと見なされなくなりますか? もしそうなら、私のコードは私が必要とするものを実行します。私のコードは次のとおりです。
//get the batch and execute in a child thread and need to continue only after the thread get terminated.
for (int i = 0; i <= QueueCount/20;i++)
{
Thread newThread = new Thread(ProcessMailQueue);
newThread.Start();
while(!newThread.IsAlive);
Thread.Sleep(1);
newThread.Join();
}
//delay after each batch execution
private void ProcessMailQueue()
{
send the full mails in a batch
Thread.Sleep(20000);
}
どなたかご提案をお願いします。...