Name | Product | Job status | Due Day | Region | Division |
ABC | 1 | Pending | 1 | America | 123 |
XYZ | 2 | Pending | 30 | India | 123 |
ASD | 3 | Pending | 25 | Denmark | 123 |
ZYA | 4 | Pending | 30 | India | 345 |
YLA | 5 | Pending | 25 | Denmark | 234 |
AST | 6 | Pending | 23 | America | 123 |
BWA | 7 | Pending | 12 | Nepal | 123 |
ACE | 8 | Pending | 14 | Austria | 123 |
Name | Region |
Manager1 | America |
Manager2 | Nepal |
Manager3 | Denmark |
Manager1 | India |
Manager5 | Denmark |
Manager3 | America |
Manager2 | America |
Manager1 | America |
For example if i say Region America in both table is match and Division is 123 then send one mail to manager with product number in subject line and one excel sheet which has details of table 1 .
I only need to send 1 email to manager with csv file.
Apply to each should only iterate into csv file. Once the csv is ready it should send only 1 mail to each manager from respective regions with all pending details. Instead of several emails.