I'm trying to report the result of multiple mail send.
So I'm using a map where I keep track of mail subject and the Success flag (SMTP_MessageSent event).
My Sub execute multiple sends :
Sub SendMails ()
SendMail1() : CurrentMailSubject="mail1"
SendMail2() : CurrentMailSubject="mail2"
SendMail3() : CurrentMailSubject="mail3"
End Sub
*CurrentMailSubject is a Global var
The SendMail sub reside in a code module and execute a SMTP.Send method.
My target is to track the success for each send to report it to the user.
To do this, I'm populating the map within the "SMTP_MessageSent" event :
Sub SMTP_MessageSent(Success As Boolean)
MyMap.Put(CurrentMailSubject,Success)
End Sub
At the end of all sends I expect that the map was been populated for each mail sent with the related Success flag.
This doesn't happen and I have only the last mail sent result in the map.
I don't understand why.
Any suggestions ?
So I'm using a map where I keep track of mail subject and the Success flag (SMTP_MessageSent event).
My Sub execute multiple sends :
Sub SendMails ()
SendMail1() : CurrentMailSubject="mail1"
SendMail2() : CurrentMailSubject="mail2"
SendMail3() : CurrentMailSubject="mail3"
End Sub
*CurrentMailSubject is a Global var
The SendMail sub reside in a code module and execute a SMTP.Send method.
My target is to track the success for each send to report it to the user.
To do this, I'm populating the map within the "SMTP_MessageSent" event :
Sub SMTP_MessageSent(Success As Boolean)
MyMap.Put(CurrentMailSubject,Success)
End Sub
At the end of all sends I expect that the map was been populated for each mail sent with the related Success flag.
This doesn't happen and I have only the last mail sent result in the map.
I don't understand why.
Any suggestions ?