# react-native-mail-launcher

> Launch mail app from react-native application

Latest version **1.0.5** (published 2018-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-mail-launcher
pnpm add react-native-mail-launcher
yarn add react-native-mail-launcher
bun add react-native-mail-launcher
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2018-10-30 |
| First published | 2018-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 65.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eric Bower |
| Maintainers | neurosnap |
| Keywords | react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-mail-launcher
- npm.io page: https://npm.io/package/react-native-mail-launcher

## Recent versions

- 1.0.5 (latest) — 2018-10-30
- 1.0.4 — 2018-10-30
- 1.0.3 — 2018-10-30
- 1.0.2 — 2018-10-30
- 1.0.1 — 2018-10-30
- 1.0.0 — 2018-10-30

## README

# react-native-mail-launcher

Launch mail app from react-native application

## Getting started

`$ npm install react-native-mail-launcher --save`

### Mostly automatic installation

`$ react-native link react-native-mail-launcher`

#### Android

1. Open up `android/app/src/main/java/[...]/MainActivity.java`

- Add `import com.reactlibrary.RNMailLauncherPackage;` to the imports at the top of the file
- Add `new RNMailLauncherPackage()` to the list returned by the `getPackages()` method

2. Append the following lines to `android/settings.gradle`:
   ```
   include ':react-native-mail-launcher'
   project(':react-native-mail-launcher').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-mail-launcher/android')
   ```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
   ```
     compile project(':react-native-mail-launcher')
   ```

#### iOS

We do not need a native module for iOS

## Usage

```javascript
import * as React from "react";
import { View, Button } from "react-native";
import launchMailApp from "react-native-mail-launcher";

export default class Example extends React.Component {
  openMail = () => {
    launchMailApp();
  };

  render() {
    return (
      <View>
        <Button onPress={this.openMail}>Go to mail client</Button>
      </View>
    );
  }
}
```

---
_Source: https://npm.io/package/react-native-mail-launcher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
