SmtpClientBulkSendAgent which MailMessage processed?

Hi,

We are using Aspose.Network.dll v 6.4.0.0

When using the SmtpClientBulkSend agent we wish to know which MailMessage is processed (or sent). The events MessageSending and MessageSent both only have default EventArgs, therefore we cannot determine which message was or is processed.

SmtpClientBulkSendAgent agent = new SmtpClientBulkSendAgent(client);
agent.AddMessages(messages);
agent.MessageSent += new EventHandler(agent_MessageSent);
agent.MessageSending += new EventHandler(agent_MessageSending);
agent.BulkSendCompleted += new EventHandler(agent_BulkSendCompleted);
agent.Start();

Both events don't pass the corresponding MailMessage.

void agent_MessageSending(object sender, EventArgs e)
void agent_MessageSent(object sender, EventArgs e)

Can this be accomplished?

Please inform.

Jan Stolk

Hello Jan,

Thank you for inquiry.

I am afraid, it is not possible with the current version. I have added a new feature request (ID: 29600). We will inform you when this feature gets available.

The issues you have found earlier (filed as 29600 ) have been fixed in [this update](http://www.aspose.com/community/files/51/.net-components/aspose.network-for-.net/entry325827.aspx).

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi Jan,

Please use the event handler as below to get the MailMessgae instance of the message being processed.

void bulkAgent_MessageSent(object sender, EventArgs e)
{
SmtpClientBulkSendEventArgs ev = (SmtpClientBulkSendEventArgs)e;
Debug.WriteLine(ev.Message.To.ToString() + “. Send completed.”);
}

Thanks!

We will check this new feature out.

Kind regards,
Jan.v