capacitor-email-composer

E-Mail Composer Plugin for Capacitor

Usage no npm install needed!

<script type="module">
  import capacitorEmailComposer from 'https://cdn.skypack.dev/capacitor-email-composer';
</script>

README

Capacitor E-Mail Composer

Maintenance npm

👉🏼 Note: this Plugin is developed for Capacitor V3

This Plugin is used to open a native E-Mail Composer within your Capacitor App.

Donate

This and other Open-Source Cordova/Capacitor Plugins are developed in my free time. To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, if you're being paid to make the app, if you're asking for new features or priority bug fixes.

Table of Content

Install

npm install capacitor-email-composer
npx cap sync

API

hasAccount()

hasAccount() => Promise<{ hasAccount: boolean; }>

Checks if the User can send a Mail iOS: Check if the current Device is configured to send mail Android: Currently does nothing

Returns: Promise<{ hasAccount: boolean; }>


open(...)

open(options?: OpenOptions | undefined) => Promise<void>

Open the E-Mail Composer

Param Type Description
options OpenOptions optional Options to prefill the E-Mail

Interfaces

OpenOptions

Prop Type Description
to string[] email addresses for TO field
cc string[] email addresses for CC field
bcc string[] email addresses for BCC field
subject string subject of the email
body string email body
isHtml boolean indicats if the body is HTML or plain text (primarily iOS)

Changelog

The full Changelog is available here