Separate mails to different receivers

Denica Daceva asked on January 13, 2016 13:48

Hello,

is there a way to send separate mail for each receiver in a form notification e-mail?

For example, we have in the receiver field: email1@test.com;email2@test.com;email3@test.com

The receiver 1 with email1@test.com gets email "to: email1@test.com" The receiver 2 with email2@test.com gets email "to: email2@test.com" The receiver 3 with email3@test.com gets email "to: email3@test.com"

In other words:

the mail address of recepients are not visible to each other.

Thank you!

Be well,

Recent Answers


Dawid Jachnik answered on January 13, 2016 13:58

Hello, You can't do it in Online form, but did you tried do disable the notifiaction email and do it manule through the event handler ?

CMS.OnlineForms.BizFormInfo.TYPEINFO.Events.Insert.After += Insert_After;

then in the function

private void Insert_After(object sender, CMS.DataEngine.ObjectEventArgs e)
{
    CMS.OnlineForms.BizFormItem bi = (CMS.OnlineForms.BizFormItem)e.Object;
    if (bi.BizFormClassName == "yourbizformclassname")
    {
        //make loop throught the notification emails and send them email separetly
    }
}
2 votesVote for this answer Mark as a Correct answer

David te Kloese answered on January 13, 2016 14:40

Hi,

Or set them all in the BCC 'field' :). But this also does require you to write custom code like Dawid mentioned above.

Greets,

David

0 votesVote for this answer Mark as a Correct answer

Denica Daceva answered on January 13, 2016 15:04

@David te Kloese

Hi, yes, I though about it, but the email notification module doesn't provide the BCC field, so it is not easy like pasting the fields in there :)

Gonna look through it,

Thanks

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.