# react-native-sendgrid

> Is a API Wrapper to send emails using SendGrid

Latest version **1.0.2** (published 2021-01-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-native-sendgrid
pnpm add react-native-sendgrid
yarn add react-native-sendgrid
bun add react-native-sendgrid
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-01-14 |
| First published | 2019-03-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Ismael Martinez |
| Maintainers | scriptmatico |
| Keywords | sendgrid, react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-sendgrid
- Repository: https://github.com/Scriptmatico/react-native-sendgrid
- Homepage: https://github.com/Scriptmatico/react-native-sendgrid#readme
- Issues: https://github.com/Scriptmatico/react-native-sendgrid/issues
- npm.io page: https://npm.io/package/react-native-sendgrid

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-01-14
- 1.0.1 — 2019-03-10
- 1.0.0 — 2019-03-09

## README

# **If this project result useful for you consider donate**

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/I3I338SBZ)

<a target="_blank" href="https://www.buymeacoffee.com/scriptmatico"><img width="117" height="30" src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png"></a>

[![](https://www.paypalobjects.com/en_US/MX/i/btn/btn_donateCC_LG.gif)](https://paypal.me/Scriptmatico)

# **React Native SendGrid**
Is a API Wrapper for SendGrid, Usage is simple

# **Installation**
```bash
npm install --save react-native-sendgrid
```
# **Usage**
```javascript
import { sendGridEmail } from 'react-native-sendgrid'
...
...
const SENDGRIDAPIKEY = "YOURAPIKEY";
const FROMEMAIL = "test@test.com";
const TOMEMAIL = "me@test.com";
const SUBJECT = "You have a new message";

export class ContactForm extends Component {
	constructor(props) {
   		super(props);
   		this.state = {name : "", email: "", phone:""};
	}

	yourSendEmailFunction(){
		
		const ContactDetails = "Contact Data: " + this.state.name + " Mail: "+ this.state.email+" Phone: "+this.state.phone
		
		const sendRequest = sendGridEmail(SENDGRIDAPIKEY, TOMEMAIL, FROMEMAIL, SUBJECT, ContactDetails )
	        sendRequest.then((response) => {
	            console.log("Success")
	        }).catch((error) =>{
	            console.log(error)
	        });
	}

}
```

# **Use HTML**
By default all emails are send in "text/plain" format if you want to use html format just use this way:

```javascript
const sendRequest = sendGridEmail(SENDGRIDAPIKEY, TOMEMAIL, FROMEMAIL, SUBJECT, ContactDetails, "text/html" )
```



**admin@scriptmatico.com**

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