Is it possible to send triggered email to a logged in users by code?

I have a client that has a system where all the users are registered with the e-mail they supply when they click ORDER. All users are stored with their email, first name, last name, phone and they all share the same password. There is no page where a user can login on the site so users are not used in the way they are supposed to.

BUT
Now comes the trick I am thinking of. By using Wix Code and the wixUsers.login I would think that I can send that user a triggered email and then log them out from the system using the wixUsers.logout(); and by doing this in a loop I could send triggered email to all users of the site as long as I have their email and passwords stored and accessible?


Please someone comment on this trick to see if possible to pull off. If you think it would work it would be worth building but if not I am not spending the time doing it.

I know we can all use emailjs or SendGrid and the templates they offer but I want my customers to be able to use Wix only as their business platform for digital things.

Morning :slight_smile:

Focusing on your email question only (not the ‘tip’ comment in your notes):

(1) So they have a list of contacts and they want to send out a mass email to all of this ‘first list’ …
(2) Then 1 person opens email, clicks on link, enters up to 3 new email addresses …
(3) Then you send an auto email to those 3 new email addresses?
(4) And this repeats for everyone?

If I understood the above correctly, then a possible approach would be:

(1) Send a WixShout outs email to entire ‘first list’ (not a free solution depending on the amount of newsletters / will show wix brand if not upgraded)
(2) Person opens webpage and enters up to 3 new email addresses …
(3) Use SendGrid npm (w/template message) to trigger the new emails (possibly not a free solution depending on quantity of emails)
(4) Repeat 3 + 4.

By sending out a WixShout newsletter, they wouldn’t have to be logged in, they would just have to be in the contacts list.

You can email me to schedule a brief chat to talk about this if you still need help analyzing approach to project.

Hey Code Queen!
The thing is that I don’t want to use external services outside Wix. And “they wouldn’t have to be logged in” makes me think you did not read the coding part? I am logging them in by code so the user won’t even see the login modal window at all.

Wouldn’t this be a cooler solution that just using sendGrid? I greatly appreciate your feedback.

@andreas-kviby Cooler yes, but more than likely limited. While your user doesn’t have to be logged in, and you want to loop the login/out via code to trigger the process — you don’t get unlimited ShoutOuts. You may want to contact Wix to ask them if the limit of sending Triggered emails is the same as a ShoutOut (mass email) campaign or if it’s different. So once you hit your sending limit your code will most likely stop. The triggered email is powered by Wix ShoutOuts app.

Here is more information about Wix ShoutOuts app:

If Wix does have a limit, then possibly the unlimited plan of Wix ShoutOuts would work for your project. (The unlimited plan starts around $45 per month)

And here is information about SendGrid: