looping over all my site's users

Hi,
I wrote a code that sends email to users, but the problem is that its sending the email only to the logged-in user.
I want to loop throgh all my users and get their Id so I can use my sending email function.

my code looks like this:

import { triggeredEmails } from 'wix-crm';
import wixUsers from 'wix-users';

$w.onReady(function () {
    $w('#testButton').onClick( () => {
        let user = wixUsers.currentUser;
            wixUsers.currentUser.getRoles().then((roles) => 
            { 
              for (let i = 0 ; i < roles.length ; i++) {                  
                    if (roles[i].name == 'Experiment no video' || roles[i].name == 'Experiment with video' ) {  
                        triggeredEmails.emailContact('Contact', user.).then(() => {
                            console.log('Email was sent to contact');
                        })
                           .catch((error) => {
                              console.error(error);
                            });
                    }
                    if(i==roles.length)break;
                } 
            })
    });
});

You can’t do it like that.

If you need to get all your the member’s role, I think you’ll have to store the roles in a database collection.
Then you’ll be able to run a query the collection (you’re better do it from the backend put it in a jsw file and import it to front-end and call it from there).

[Guys, if there’s a better way, please correct me]