I have a couple of mail-ids in a column and need to send mail automatically through the RDComclient function. The below code is successfully executed but it sends multiple emails to the same sender n times (instead of single mail to every mail-ids). Here n is the total number of rows in the mail-id column. Not sure where I'm missing.
In the below example, all 3 receive 3 e-mails each instead of one
Sample Dataset df:
Mail_id:
jack@reah.com
johnes@reah.com
thej@outlook.com
Code
for (mail in df$Mail_id)
{
outMail = outApp$CreateItem(0)
outMail[["cc"]] = mail
outMail$Send()
}