in reply to Need to send two simultaneous mails
Where exactly are you having problems? Is it that the logic for determining receivers is wrong or is it that the logic for sending mails is wrong?
You can approach this by writing a dummy mail routine that just prints out its parameters if it was called. That way you will know if your mail sending routine is called twice or only once.
If you have only one order in your hand, but need to send more than one mail, I would suggest that you accumulate all the mails you need to send in a list, and at the end work through that list to send all the mails. In your code, I only see that you are setting the sender of the mail, but you only ever construct one mail. Maybe that is your problem?
|
|---|