# Trigger emails to not the current user

**URL:** <https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [September 26, 2018, 1:01am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565 "2018-09-26T01:01:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric-curtiss](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/eric-curtiss/32/3466_2.png) [@eric-curtiss](https://forum.wixstudio.com/u/eric-curtiss)\
**Post date:** [September 26, 2018, 1:01am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/1 "2018-09-26T01:01:01Z")

</div>

I would like to send a triggered email when certain actions are completed by one user that affect another user. Example: Ed is logged in and completes a form submission that Karen is waiting for. I would like to trigger an email to Karen when Ed submits the form. Any help would be greatly appreciated. As far as I can tell, the wixCRM API only allows emails to the currently logged in user. I.e. wixCRM.emailContact(“Offer\_accepted”, contactId) requires that contactId is the Id of the current user.

---

<div class="post-metadata">

**Author:** ![simonas-pauliukevici](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/simonas-pauliukevici/32/669_2.png) [@simonas-pauliukevici](https://forum.wixstudio.com/u/simonas-pauliukevici)\
**Post date:** [September 27, 2018, 8:31am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/2 "2018-09-27T08:31:58Z")

</div>

Hi, Eric.  
You can [send an email](https://support.wix.com/en/article/how-to-send-a-triggered-email-to-members-with-code-8753188) to any contact/member of your site, it’s not limited to the current user.

---

<div class="post-metadata">

**Author:** ![eric-curtiss](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/eric-curtiss/32/3466_2.png) [@eric-curtiss](https://forum.wixstudio.com/u/eric-curtiss)\
**Post date:** [October 3, 2018, 4:02pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/3 "2018-10-03T16:02:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mcleodrp](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mcleodrp/32/6112_2.png) [@mcleodrp](https://forum.wixstudio.com/u/mcleodrp)\
**Post date:** [October 16, 2018, 1:40am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/4 "2018-10-16T01:40:40Z")

</div>

I have run into the same problem. Have you discovered a solution, yet?

---

<div class="post-metadata">

**Author:** ![peter-boehm](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/peter-boehm/32/2551_2.png) [@peter-boehm](https://forum.wixstudio.com/u/peter-boehm)\
**Post date:** [October 25, 2018, 10:00am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/5 "2018-10-25T10:00:50Z")

</div>

I also have the same problem. I can only imagine this is a kind of bug in WIX’s own code which makes this otherwise very useful function ( **wixCRM.emailContact** ) practically unusable

---

<div class="post-metadata">

**Author:** ![giri-zano](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/giri-zano/32/80469_2.png) [@giri-zano](https://forum.wixstudio.com/u/giri-zano)\
**Post date:** [October 25, 2018, 2:26pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/6 "2018-10-25T14:26:33Z")

</div>

Guys, this issue has come up before. You do know that there is another way of sending emails from Wix Code, don´t you? [https://girizano.wixsite.com/codecorner/home/send-email-thru-gmail-and-others-in-wix-code](https://girizano.wixsite.com/codecorner/home/send-email-thru-gmail-and-others-in-wix-code)

---

<div class="post-metadata">

**Author:** ![peter-boehm](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/peter-boehm/32/2551_2.png) [@peter-boehm](https://forum.wixstudio.com/u/peter-boehm)\
**Post date:** [October 28, 2018, 7:50am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/7 "2018-10-28T07:50:26Z")

</div>

Thanks a lot, Giri!  
EmailJS’s service works in fact perfectly and reliably and it is quite easy to implement. Your interfacing code template was also very useful and absolutely flawless !  
Kind regards  
Peter

---

<div class="post-metadata">

**Author:** ![giri-zano](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/giri-zano/32/80469_2.png) [@giri-zano](https://forum.wixstudio.com/u/giri-zano)\
**Post date:** [October 28, 2018, 6:05pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/8 "2018-10-28T18:05:23Z")

</div>

@peter-boehm Glad you like it. If you feel like doing so, could you flag my answer as a Top Comment? It helps.

---

<div class="post-metadata">

**Author:** ![peter-boehm](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/peter-boehm/32/2551_2.png) [@peter-boehm](https://forum.wixstudio.com/u/peter-boehm)\
**Post date:** [October 30, 2018, 9:53am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/9 "2018-10-30T09:53:05Z")

</div>

Hi Giri, I would gladly flag your comment; I’m very new to this forum, please tell me how to do it. On the right hand pulldown menu I don’t see such possibility

---

<div class="post-metadata">

**Author:** ![giri-zano](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/giri-zano/32/80469_2.png) [@giri-zano](https://forum.wixstudio.com/u/giri-zano)\
**Post date:** [October 30, 2018, 5:56pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/10 "2018-10-30T17:56:04Z")

</div>

You are right, I don´t see the “Mark as Top Comment” either, anywhere. I thought first it had something to do with the fact that I did not ask the question, but I can´t see it anywhere in any question or answer. This thing has changed a lot lately, maybe it´s a bug, maybe a feature, it really beats me. Anyway, thanks for trying.

---

<div class="post-metadata">

**Author:** ![peterjanderson672](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/peterjanderson672/32/8461_2.png) [@peterjanderson672](https://forum.wixstudio.com/u/peterjanderson672)\
**Post date:** [January 22, 2019, 4:48pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/11 "2019-01-22T16:48:21Z")

</div>

I would like to stick with Wix CRM for the moment (rather than use a third party like sendGrid).  
Has anyone found a solution/workaround so that a logged in site member can send an email to someone else?

Its weird. If I’m not signed in (as a Site member) I can happily send an email to anyone except site members. What’s the rationale for that?

---

<div class="post-metadata">

**Author:** ![eric-curtiss](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/eric-curtiss/32/3466_2.png) [@eric-curtiss](https://forum.wixstudio.com/u/eric-curtiss)\
**Post date:** [January 22, 2019, 5:00pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/12 "2019-01-22T17:00:12Z")

</div>

I decided to switch to Sendgrid. It works perfectly and I can send emails to anyone.

---

<div class="post-metadata">

**Author:** ![peterjanderson672](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/peterjanderson672/32/8461_2.png) [@peterjanderson672](https://forum.wixstudio.com/u/peterjanderson672)\
**Post date:** [January 22, 2019, 5:04pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/13 "2019-01-22T17:04:09Z")

</div>

@eric-curtiss Thanks. I was hoping that Wix triggered emails would be integrated in ‘Wix Ascend’ so that they showed up in the contact’s Inbox. Probably too high an expectation.

---

<div class="post-metadata">

**Author:** ![giri-zano](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/giri-zano/32/80469_2.png) [@giri-zano](https://forum.wixstudio.com/u/giri-zano)\
**Post date:** [January 22, 2019, 9:08pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/14 "2019-01-22T21:08:22Z")

</div>

This subject has come up many times. Sendgrid is a solution. There is also the solution thru email.js which I covered a while back. Still works perfectly. [https://girizano.wixsite.com/codecorner/home/send-email-thru-gmail-and-others-in-wix-code](https://girizano.wixsite.com/codecorner/home/send-email-thru-gmail-and-others-in-wix-code)

---

<div class="post-metadata">

**Author:** ![peterjanderson672](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/peterjanderson672/32/8461_2.png) [@peterjanderson672](https://forum.wixstudio.com/u/peterjanderson672)\
**Post date:** [January 22, 2019, 9:23pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/15 "2019-01-22T21:23:13Z")

</div>

Thanks Girl. i wonder why Wix wastes our time with their CRM API that doesn’t work?

---

<div class="post-metadata">

**Author:** ![plomteuxquentin](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/plomteuxquentin/32/9345_2.png) [@plomteuxquentin](https://forum.wixstudio.com/u/plomteuxquentin)\
**Post date:** [May 19, 2019, 1:12am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/16 "2019-05-19T01:12:42Z")

</div>

That should really be **HIGHLIGHT** in the doc. I wasted another on that due to poor information!

---

<div class="post-metadata">

**Author:** ![ndanielgrade](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ndanielgrade/32/12920_2.png) [@ndanielgrade](https://forum.wixstudio.com/u/ndanielgrade)\
**Post date:** [June 24, 2019, 11:23pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/17 "2019-06-24T23:23:47Z")

</div>

Brilliant Giri… thanks a lot!

---

<div class="post-metadata">

**Author:** ![cwvega76](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@cwvega76](https://forum.wixstudio.com/u/cwvega76)\
**Post date:** [April 11, 2020, 4:26pm UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/18 "2020-04-11T16:26:22Z")

</div>

PERFECT alternative to SendGrid that hopefully is reliable!  
THANK YOU VERY MUCH!

---

<div class="post-metadata">

**Author:** ![david89](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@david89](https://forum.wixstudio.com/u/david89)\
**Post date:** [May 20, 2020, 12:47am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/19 "2020-05-20T00:47:48Z")

</div>

Hold on, why is Wix not fixing this? I don’t want to rely on a 3rd party solution.

---

<div class="post-metadata">

**Author:** ![cwvega76](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@cwvega76](https://forum.wixstudio.com/u/cwvega76)\
**Post date:** [May 20, 2020, 12:55am UTC](https://forum.wixstudio.com/t/trigger-emails-to-not-the-current-user/4565/20 "2020-05-20T00:55:53Z")

</div>

David, I gave up on waiting for Wix. At least EmailJS is a reliable solution and 1/2 the cost of Wix Ascend.
