Sending triggered email to multiple email addresses

Fairly new to this all, but I’ve managed to set some code to send a triggered email to a users email address. The next step I’m looking to implement is having this email CC or BCC to an email address I as an admin will be monitoring. Any suggestions would be appreciated.

hey there! I am having the same trouble with the issue you’re having i also just posted something. Could you maybe share your code for sending the triggered emails that would help me a ton, I am finally at the last stage of this webshop so will also dive in deeper to the rest of the issue. Will let you know when i hear something!

There is this tutorial already set up that shows you how to send an email on form submission, which sends an email to the recipient as well as an email to the sender.
https://support.wix.com/en/article/corvid-tutorial-sending-an-email-on-form-submission

As for sending triggered emails to contacts and members, see here.
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-contacts
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-members

Note that to contacts uses Wix CRM API and to members uses Wix Users API.
The CRM API contains functionality for working with your site’s contacts. The Users API contains functionality for working with users who are logged-in members. Note that all members are also contacts, but contacts are not necessarily members.

See here for all API references - https://www.wix.com/corvid/reference/APIsOverview.html

You can also look at using Wix Package Manager too and using SendGrid’s own nodeJS as Yisrael has shown in this tutorial example here.
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-send-email-with-the-sendgrid-npm-interface
https://support.wix.com/en/article/corvid-managing-external-code-libraries-with-the-package-manager

Also, don’t forget that you also have the use of Wix Automations through your Wix Dashboard too, so you don’t always have to use code to send a message or an email to somebody else.
https://support.wix.com/en/ascend-by-wix/wix-automations

Thanks for your input. Regarding the Wix Automations, am I correct in assuming I’d want to choose Trigger → Inbox, Choose an Action → Get Notified? My existing code currently emails users when they click a button, but after trialing this I never received the notification that an email was sent.

Code looks something like this:

import wixData from ‘wix-data’;
import wixUsers from ‘wix-users’;

$w.onReady( function () {
$w(“#button1”).onClick(() => {
if (wixUsers.currentUser.loggedIn) {
const userId = wixUsers.currentUser.id;
wixUsers.emailUser(“TestEmail”, userId, {
variables: {
“UserNameVar”: $w(‘#text29’).text,
“UserEmailVar”: $w(“#text26”).text
}
} );
}
} );
});

UserNameVar and UserEmailVar were just two variables I created in the Triggered Email, with the text29 and text26 just referring to a couple of text boxes on the page button1 is on. TestEmail is the name of my Triggered Email.

Have you read the Wix Automations tutorial that is already in Wix Support pages for it?
https://support.wix.com/en/article/setting-up-an-automation

If your button is on a user input form then you need to do a trigger from a form, plus if you have anything through Wix Corvid on your website too, like your own user input forms, then these will be listed too under the Corvid section.

Also, note that the Wix Automations only does the one email in each setup, however you can easily setup one automation that goes to the user who submitted the form and then another automation that sends you an email and the user inputs from the form if you wish to have that shown too.

Wix Automations is the simplest and easiest way to do it, however doing it through coded options will give you more control and options as to how to do it yourself.

Thanks for that! I’ve had a play around today with a button on a user input form. However I’d like the button to trigger an email to the email registered with the user. Seems I can only send an email if they enter theirs as part of the user input form? i imagine this would be less clunky with coded options?

If the user is already signed up to your website then you can simply use the email a member triggered email tutorial here.
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-members

As they are already a member you can simply use Wix Users to get the users email address to send the email to.

If it just a general public enquiry for example, then yes you would need to collect their email address so that Wix CRM can make them a contact in your Contacts list in your Wix Dashboard, then you can simply use the email to contacts triggered email with Wix CRM.

This is what I have done on my own site for one of my user input forms, although I have also setup the SendGrid email on form submission one too that is used on another page.

I have simply used the triggered email to members tutorial so that it sends a triggered email to the member and I have simply set up a Wix Automation back to myself (it can be another email that you use instead, doesn’t have to be the admin email associated to the account) that simply informs me of that user who has submitted a form and what info they have placed in the form too.

Very similar to what is stated here in the Wix Automation link from earlier.

Get Notified
This feature is especially useful for communicating significant site-events to your team. You can send notifications to multiple addresses.

Send notification to: Enter the address that the notification email should be sent to. For multiple recipients, separate each address with a comma.
Email subject : Write the notification’s subject line.
Message : Write the notification’s content.

Select the Include details toggle if you want to receive details such as what data was collected or what was purchased.

It all depends on what you want to do with the email sent back to yourselves.

If it is just to let you know that a user has submitted a form for example then a bog standard Wix Automation email back to myself is just fine with the info that the user has put on the form too.

However, if it is going to go to somebody else like a client for example, then obviously they might want a more fancy or their own branded email reply for example, so you would need to do that yourself.

Yep this is the one I’m looking for. Triggered email to users, and then an automated email to myself notifying me that the email was sent.

Is there a specific or exact setup I need to have an automated email sent to me for that?

Hi, I’m trying to get the Thank You email from a form submission sent to not just the person who filled out the form. I’m building a petition website and I need to Thank You email (which I will customise to have the text of the petition) to go a third party email (parliament). Is there anyway to add/change the destination of a Thank You email?

Also tried to send notification instead but that doesn’t allow for variables (such as name of person… from the form fields) as it’s only plain text. Any advice please? Thanks