How to "select" or "code" your default sender for triggered emails?

Hello everyone!

I’m in a pinch, I have the following code:

import { triggeredEmails } from 'wix-crm';

export function button18_click(event) {
    let memberID = "sample-45bd-aa64-5c97d06b0161"
    const armorStatus = "Approve test"
    const competitorName = "test name"
    const firstCheckValue = "Member 1"
    const secondCheckValue = "Member 2"
    console.log("armorStatus: ", armorStatus, "Name: ", competitorName, "1th check: ", firstCheckValue, "2nd check: ", secondCheckValue);
    // Triggered email function
    triggeredEmails.emailMember("ApprovedArmor", memberID, {
        variables: {
            ArmorStatus: armorStatus,
            CompetitorName: competitorName,
            firstCheck: firstCheckValue,
            secondCheck: secondCheckValue
        },
    });
}

Now I have an issue… I got 4 departments, all have their own email (and these are added in multiple sender). But how do I code the sender email into this?

I can’t find any info or documentation…
I won’t be surprised if this would not be possible with Wix…

I hope someone can help me out…
greetings

Hi Buhurt

As of this moment, I believe it’s not possible to programmatically change the sender (even if you have added a collaborated in the dashboard). In the Dashboard you can only change the standard sender.

Yea unfortunately again a half made api…
Like they promote as “easy” , “good to have” etc…

But yea… Eco system…
@wixsupport: feedback, add programmical method to add a sender email and email to send to without member ID :sweat_smile:

Probably will refund the product… until it works as they promote it.