Socket
Book a DemoInstallSign in
Socket

@emailjs/react-native

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emailjs/react-native

EmailJS helps to send emails directly from your code. Official EmailJS SDK for React Native

5.1.0
latest
Source
npmnpm
Version published
Weekly downloads
1.3K
-2.19%
Maintainers
1
Weekly downloads
 
Created
Source

Official EmailJS SDK for React Native

SDK for EmailJS.com customers.
Use you EmailJS account for sending emails.

codecov npm version

Disclaimer

This is the SDK for React Native only, otherwise use

Official SDK Docs

Intro

EmailJS helps to send emails directly from your code. No large knowledge is required – just connect EmailJS to one of the supported email services, create an email template, and use our SDK to trigger an email.

Usage

Install EmailJS SDK using npm:

$ npm install @emailjs/react-native

With Expo CLI:

$ npx expo install @emailjs/react-native

The package uses @react-native-async-storage/async-storage for the storage (for the rate limit feature)

Note: By default, API requests are disabled for non-browser applications. You need to activate them through Account:Security.

FAQ

API calls are disabled for non-browser applications

You need to activate API requests through Account:Security.

Examples

ECMAScript modules

send email

import emailjs from '@emailjs/react-native';

const templateParams = {
  name: 'James',
  notes: 'Check this out!',
};

emailjs
  .send('YOUR_SERVICE_ID', 'YOUR_TEMPLATE_ID', templateParams, {
    publicKey: 'YOUR_PUBLIC_KEY',
  })
  .then(
    (response) => {
      console.log('SUCCESS!', response.status, response.text);
    },
    (err) => {
      console.log('FAILED...', err);
    },
  );

init (optional)

import emailjs from '@emailjs/react-native';

// set Public Key as global settings
emailjs.init({
  publicKey: 'YOUR_PUBLIC_KEY',
});

emailjs.send('YOUR_SERVICE_ID', 'YOUR_TEMPLATE_ID').then(
  (response) => {
    console.log('SUCCESS!', response.status, response.text);
  },
  (err) => {
    console.log('FAILED...', err);
  },
);

await/async with EmailJS error handler

import emailjs, { EmailJSResponseStatus } from '@emailjs/react-native';

try {
  await emailjs.send(
    'YOUR_SERVICE_ID',
    'YOUR_TEMPLATE_ID',
    {},
    {
      publicKey: 'YOUR_PUBLIC_KEY',
    },
  );
  console.log('SUCCESS!');
} catch (err) {
  if (err instanceof EmailJSResponseStatus) {
    console.log('EMAILJS FAILED...', err);
    return;
  }

  console.log('ERROR', err);
}

CommonJS modules

send email

const emailjs = require('@emailjs/react-native');

var templateParams = {
  name: 'James',
  notes: 'Check this out!',
};

emailjs
  .send('YOUR_SERVICE_ID', 'YOUR_TEMPLATE_ID', templateParams, {
    publicKey: 'YOUR_PUBLIC_KEY',
  })
  .then(
    function (response) {
      console.log('SUCCESS!', response.status, response.text);
    },
    function (err) {
      console.log('FAILED...', err);
    },
  );

Keywords

js email

FAQs

Package last updated on 27 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.