@@ -9,6 +9,7 @@ Use you EmailJS account for sending emails.
99This is a flutter-only version, otherwise use
1010- [ Browser SDK] ( https://www.npmjs.com/package/@emailjs/browser )
1111- [ Node.js SDK] ( https://www.npmjs.com/package/@emailjs/nodejs )
12+ - [ React Native SDK] ( https://www.npmjs.com/package/@emailjs/react-native )
1213- [ REST API] ( https://www.emailjs.com/docs/rest-api/send/ )
1314
1415## Links
@@ -18,7 +19,7 @@ This is a flutter-only version, otherwise use
1819## Intro
1920
2021EmailJS helps to send emails directly from your code.
21- No large knowledge is required – just connect EmailJS to one of the supported
22+ No server is required – just connect EmailJS to one of the supported
2223email services, create an email template, and use our SDK
2324to trigger an email.
2425
@@ -44,47 +45,47 @@ through [Account:Security](https://dashboard.emailjs.com/admin/account/security)
4445** send email**
4546
4647``` dart
47- import package:emailjs/emailjs.dart
48+ import package:emailjs/emailjs.dart as emailjs
4849
4950Map<String, dynamic> templateParams = {
5051 'name': 'James',
5152 'notes': 'Check this out!'
5253};
5354
5455try {
55- await EmailJS .send(
56- '< YOUR_SERVICE_ID> ',
57- '< YOUR_TEMPLATE_ID> ',
56+ await emailjs .send(
57+ 'YOUR_SERVICE_ID',
58+ 'YOUR_TEMPLATE_ID',
5859 templateParams,
59- const Options(
60- publicKey: '< YOUR_PUBLIC_KEY> ',
61- privateKey: '< YOUR_PRIVATE_KEY> ',
60+ const emailjs. Options(
61+ publicKey: 'YOUR_PUBLIC_KEY',
62+ privateKey: 'YOUR_PRIVATE_KEY',
6263 ),
6364 );
6465 print('SUCCESS!');
6566} catch (error) {
66- print(error.toString() );
67+ print('$ error' );
6768}
6869```
6970
7071** init (optional)**
7172``` dart
72- import package:emailjs/emailjs.dart
73+ import package:emailjs/emailjs.dart as emailjs
7374
7475// set Public Key as global settings
75- EmailJS .init(const Options(
76- publicKey: '< YOUR_PUBLIC_KEY> ',
77- privateKey: '< YOUR_PRIVATE_KEY> ',
76+ emailjs .init(const emailjs. Options(
77+ publicKey: 'YOUR_PUBLIC_KEY',
78+ privateKey: 'YOUR_PRIVATE_KEY',
7879));
7980
8081try {
8182 // send the email without dynamic variables
82- await EmailJS .send(
83- '< YOUR_SERVICE_ID> ',
84- '< YOUR_TEMPLATE_ID> ',
83+ await emailjs .send(
84+ 'YOUR_SERVICE_ID',
85+ 'YOUR_TEMPLATE_ID',
8586 );
8687 print('SUCCESS!');
8788} catch (error) {
88- print(error.toString() );
89+ print('$ error' );
8990}
9091```
0 commit comments