Trigger emails to not the current user

Hi Simonas,

It doesn’t work. I have tested the following code in the onReady function of one of my pages. In theory, it should send an email to user 09ba053a-0a68-401b-a1de-e4270ae10c34 every time someone visits the page.

import wixCRM from ‘wix-crm’; //for sending emails to contacts

$w.onReady( function ()
{
let contactId = “09ba053a-0a68-401b-a1de-e4270ae10c34”;
wixCRM.emailContact(“Offer_accepted”, contactId);
});

In reality, if anyone but the user 09ba053a-0a68-401b-a1de-e4270ae10c34 goes to this page, they get the following error in the console: Uncaught (in promise) contactId does not match current session contact (401)

-Eric