Skip to content

Commit 2b5358f

Browse files
committed
README updated
1 parent d19ab66 commit 2b5358f

File tree

3 files changed

+98
-431
lines changed

3 files changed

+98
-431
lines changed

README.md

+95-57
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,15 @@
2323
<br />
2424
<p align="center">
2525
<a href="https://github.com/othneildrew/Best-README-Template">
26-
<img src="logo.png" alt="Logo" width="80" height="80">
26+
<img src="logo.png" alt="Logo" width="80" height="80" />
2727
</a>
2828

2929
<h3 align="center">Parse SMTP Template</h3>
3030

3131
<p align="center">
32-
An awesome README template to jumpstart your projects!
32+
An easy way to send email templates via SMTP with your <a href="https://github.com/parse-community/parse-server">Parse Server</a>!
3333
<br />
34-
<a href="https://github.com/macarthuror/parse-smtp-template"><strong>Explore the docs »</strong></a>
3534
<br />
36-
<br />
37-
<a href="https://github.com/macarthuror/parse-smtp-template">View Demo</a>
38-
·
3935
<a href="https://github.com/macarthuror/parse-smtp-template/issues">Report Bug</a>
4036
·
4137
<a href="https://github.com/macarthuror/parse-smtp-template/issues">Request Feature</a>
@@ -64,24 +60,15 @@
6460
<!-- ABOUT THE PROJECT -->
6561
## About The Project
6662

67-
[![Product Name Screen Shot][product-screenshot]](https://example.com)
68-
69-
There are many great README templates available on GitHub, however, I didn't find one that really suit my needs so I created this enhanced one. I want to create a README template so amazing that it'll be the last one you ever need.
63+
<!-- [![Product Name Screen Shot][product-screenshot]](https://example.com) -->
7064

71-
Here's why:
72-
* Your time should be focused on creating something amazing. A project that solves a problem and helps others
73-
* You shouldn't be doing the same tasks over and over like creating a README from scratch
74-
* You should element DRY principles to the rest of your life :smile:
65+
This is a module maded it for Parse Server and an easy solution to send emails via SMTP with templates in HTML.
7566

76-
Of course, no one template will serve all projects since your needs may be different. So I'll be adding more in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue with the tag.
77-
78-
A list of commonly used resources that I find helpful are listed in the acknowledgements.
67+
We recomend to use the [Cerberus](https://github.com/TedGoas/Cerberus) for the email templates.
7968

8069
### Built With
81-
This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
82-
* [Bootstrap](https://getbootstrap.com)
83-
* [JQuery](https://jquery.com)
84-
* [Laravel](https://laravel.com)
70+
71+
* [Nodemailer](https://nodemailer.com)
8572

8673

8774

@@ -91,45 +78,108 @@ This section should list any major frameworks that you built your project using.
9178
This is an example of how you may give instructions on setting up your project locally.
9279
To get a local copy up and running follow these simple example steps.
9380

94-
### Prerequisites
95-
96-
This is an example of how to list things you need to use the software and how to install them.
97-
* npm
98-
```sh
99-
npm install npm@latest -g
100-
```
101-
10281
### Installation
10382

104-
1. Get a free API Key at [https://example.com](https://example.com)
105-
2. Clone the repo
83+
1. Install the package
84+
85+
npm
10686
```sh
107-
git clone https:://github.com/your_username_/Project-Name.git
87+
npm i parse-smtp-template
10888
```
109-
3. Install NPM packages
89+
yarn
11090
```sh
111-
npm install
91+
yarn add parse-smtp-template
92+
```
93+
2. In your Parse Server add the configuration of your email account
94+
11295
```
113-
4. Enter your API in `config.js`
114-
```JS
115-
const API_KEY = 'ENTER YOUR API';
96+
var api = new ParseServer({
97+
...
98+
emailAdapter: {
99+
module: 'parse-smtp-template',
100+
options: {
101+
port: 587,
102+
host: "smtp.mail.com",
103+
user: "name@domain.com",
104+
password: "SecurePassword",
105+
fromAddress: 'app@domain.com',
106+
107+
// Optional Parameters
108+
template: true,
109+
templatePath: "views/templates/main.html",
110+
passwordSubject: "A custom password recovery Subject",
111+
confirmSubject: "A custom email confirmation Subject"
112+
}
113+
}
114+
})
116115
```
116+
> Now is ready to use it!
117117
118+
3. (Optional) Config your email template
118119

120+
The templates have access to 4 parameters to send
121+
* link
122+
* username
123+
* appName
124+
* subject
125+
126+
To use it you only need to write ${parameter} to use it on the email
127+
128+
**IMPORTANT** -- **All the HTML file need to use only double quotes to avoid problems**
119129

120130
<!-- USAGE EXAMPLES -->
121131
## Usage
122132

123-
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
124-
125-
_For more examples, please refer to the [Documentation](https://example.com)_
133+
To use a custome template is necessary to select the correct file.
134+
In this example we are gonna use `template.html``
126135

136+
index.js
137+
```
138+
emailAdapter: {
139+
module: 'parse-smtp-template',
140+
options: {
141+
...
142+
template: true,
143+
templatePath: "views/templates/template.html"
144+
}
145+
}
127146
147+
```
148+
directory
149+
```
150+
project
151+
│ index.js
152+
153+
└─ views
154+
│ └─ templates
155+
│ └─ template.html
156+
|
157+
└─ node_modules
158+
|
159+
```
160+
`template.html`
161+
```
162+
...
163+
<tr>
164+
<td style="padding: 20px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;">
165+
<h1 style="margin: 0 0 10px; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;"> ${subject} </h1>
166+
<br>
167+
<ul style="padding: 0; margin: 0; list-style-type: disc;">
168+
<li style="margin:0 0 10px 30px;" class="list-item-first">App name: <b> ${appName} </b></li>
169+
<li style="margin:0 0 10px 30px;">Username: <b> ${username} </b></li>
170+
<li style="margin: 0 0 10px 30px;">link:</li>
171+
<li style="margin: 0 0 0 30px;" class="list-item-last"> ${link} </li>
172+
</ul>
173+
</td>
174+
</tr>
175+
...
176+
```
177+
> You can look up the template is by default in the templates folder to get a better understanding
128178
129179
<!-- ROADMAP -->
130180
## Roadmap
131181

132-
See the [open issues](https://github.com/othneildrew/Best-README-Template/issues) for a list of proposed features (and known issues).
182+
See the [open issues](https://github.com/macarthuror/parse-smtp-template/issues) for a list of proposed features (and known issues).
133183

134184

135185

@@ -156,27 +206,15 @@ Distributed under the MIT License. See `LICENSE` for more information.
156206
<!-- CONTACT -->
157207
## Contact
158208

159-
Your Name - [@your_twitter](https://twitter.com/your_username) - email@example.com
209+
Arturo Ortega - [@MacarthurOr](https://twitter.com/MacarthurOr) - arturo.ortegaro@gmail.com
160210

161-
Project Link: [https://github.com/your_username/repo_name](https://github.com/your_username/repo_name)
211+
Project Link: [https://github.com/macarthuror/parse-smtp-template](https://github.com/macarthuror/parse-smtp-template)
162212

163213

164214

165215
<!-- ACKNOWLEDGEMENTS -->
166216
## Acknowledgements
167-
* [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet)
168-
* [Img Shields](https://shields.io)
169-
* [Choose an Open Source License](https://choosealicense.com)
170-
* [GitHub Pages](https://pages.github.com)
171-
* [Animate.css](https://daneden.github.io/animate.css)
172-
* [Loaders.css](https://connoratherton.com/loaders)
173-
* [Slick Carousel](https://kenwheeler.github.io/slick)
174-
* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
175-
* [Sticky Kit](http://leafo.net/sticky-kit)
176-
* [JVectorMap](http://jvectormap.com)
177-
* [Font Awesome](https://fontawesome.com)
178-
179-
217+
* [Cerberus](https://github.com/TedGoas/Cerberus)
180218

181219

182220

@@ -185,9 +223,9 @@ Project Link: [https://github.com/your_username/repo_name](https://github.com/yo
185223
[build-shield]: https://img.shields.io/badge/build-passing-brightgreen.svg?style=flat-square
186224
[build-url]: #
187225
[contributors-shield]: https://img.shields.io/badge/contributors-1-orange.svg?style=flat-square
188-
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
226+
[contributors-url]: https://github.com/macarthuror/parse-smtp-template/graphs/contributors
189227
[license-shield]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
190228
[license-url]: https://choosealicense.com/licenses/mit
191229
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
192-
[linkedin-url]: https://linkedin.com/in/othneildrew
230+
[linkedin-url]: https://linkedin.com/in/ortegaarturo
193231
[product-screenshot]: https://raw.githubusercontent.com/othneildrew/Best-README-Template/master/screenshot.png

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@macarthur.or/parse-smtp-template",
2+
"name": "parse-smtp-template",
33
"version": "1.0.0",
44
"description": "Parse Server Module to easy send emails via SMTP with a customizable template option",
55
"main": "index.js",
@@ -27,5 +27,6 @@
2727
"homepage": "https://github.com/macarthuror/parse-smtp-template#readme",
2828
"dependencies": {
2929
"nodemailer": "4.7.0"
30-
}
30+
},
31+
"devDependencies": {}
3132
}

0 commit comments

Comments
 (0)