Problem with mailto: Link Body Text - Seeking Windows Mail and Apple Mail Feedback

I want to click on a button, take a text for the subject and a text for the body of the email. It easily takes the text for the subject, but not the body text. Any ideas?

I tested the link with PC and Windows Mail and iPhone with Apple Mail, both have the same problem, the body text is missing.


// Import the wixLocation API
import wixLocation from 'wix-location';

// Code in the ready() event handler
$w.onReady(function () {
    // Add a click event handler to the button
    $w('#button3').onClick(() => {
        // Get the text from the text input field
        let text = $w('#input2').value;
        
        // Get the subject from the input field
        let subject = $w('#input1').value;
        
        // Create the mailto link with subject and text
        let mailtoLink = 'mailto:?subject=' + encodeURIComponent(subject) + '&body=' + encodeURIComponent(text);
        
        // Debug output to check the mailto link
        console.log(mailtoLink);
        
        // Open the mailto link
        wixLocation.to(mailtoLink);
    });
});

Any experience importing text into the email body?

#Problem solved.

Create an HTML iframe with textboxes and a button.

Then use the code to write the text into the cells and trigger the HTML iframe button to submit when submit is clicked.

So if anyone has the same problem, just take a little detour :wink: