Matterway
    Preparing search index...

    Function draftEmail

    • Open default email client with prefilled recipient, subject and text

      Parameters

      • ctx: Context

        The context for automation

      • email: Email

        Email type object with to (list of recipients), subject and text

      Returns Promise<void>

      Will throw an error if the URL-encoded mailto link exceeds 2000 characters

      // First linebreak is ignored
      const text = `
      Hello,

      This is a test email.
      `;
      const email = {
      to: ['user1@example.com', 'user2@example.com'],
      subject: 'Hello',
      text: text,
      };
      await draftEmail(ctx, email);