批量电子邮件未到达目的地,在网络中丢失

问题描述 投票:-1回答:1

我在循环中使用aspose电子邮件客户端(使用c#)向IIS smtp服务器Windows 2012 R2(Server1)发送大约5000封电子邮件。发送的电子邮件在smtp服务器队列中排队。从该队列中,它们都被发送到同一目的地(oracle电子邮件归档服务器 - Server2)。

问题是 - 大约700-800(每次随机)电子邮件在传输过程中丢失。

问题 - 有没有什么方法可以将Server1上收到的所有电子邮件排队,以确保它收到完整的5000封电子邮件?任何设置,所以它可以接收电子邮件,但不转发它们?

是否向收件人保证smtp电子邮件递送?由于没有限制机制,我认为我通过发送大量电子邮件来窒息网络,然后在网络中丢失电子邮件。如果是这样,是否有一种机制可以将smtp服务器配置为缓慢处理队列。发送一些,然后等待等等。

在这方面的任何帮助非常感谢。

提前致谢。

c# iis smtp bulk mass-emails
1个回答
0
投票

@Atin,

Aspose.Email还允许您以批量形式发送电子邮件。此外,它还依赖于服务器端,它可以在任何给定时间处理多少批量电子邮件,以避免任何电子邮件的轰炸。服务器端可能有设置。但是,从Aspose.Email的角度来看,您可以考虑使用以下示例代码而不是通过循环发送。您可以将大块电子邮件分成小块,然后通过Aspose.Email提供的批量电子邮件发送选项发送。

SmtpClient client = new SmtpClient("mail.server.com", 25, "Username", "Password");

//Create instances of MailMessage class and Specify To, From, Subject and Message
MailMessage message1 = new MailMessage("[email protected]", "[email protected]", "Subject1", "message1, how are you?");
MailMessage message2 = new MailMessage("[email protected]", "[email protected]", "Subject2", "message2, how are you?");
MailMessage message3 = new MailMessage("[email protected]", "[email protected]", "Subject3", "message3, how are you?");

//Create an instance of MailMessageCollection class
MailMessageCollection manyMsg = new MailMessageCollection();
manyMsg.Add(message1);
manyMsg.Add(message2);
manyMsg.Add(message3);

//Use client.BulkSend function to complete the bulk send task
try
{
 // Send Message using BulkSend method
 client.Send(manyMsg);                
 Console.WriteLine("Message sent");
}
catch (Exception ex)
{
 Trace.WriteLine(ex.ToString());
}
© www.soinside.com 2019 - 2024. All rights reserved.