Skip to content

Commit b224c6d

Browse files
committed
Doc: Fix grammar
1 parent bc04cd6 commit b224c6d

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

twilio_sendgrid/01_create_acccount.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ In the event you fail to use the account for some time and it becomes inactive,
1515
- Uncheck the box "User email address as username"
1616
- You can use the same email address ([email protected]) when creating this new account.
1717
![Create a new account again](/images/sendgrid/create_account/new_account_again.png)
18-
- You will be asked to provide more details about your self
18+
- You will be asked to provide more details about yourself
1919
![About yourself](/images/sendgrid/create_account/your_info.png)
2020
- Once the details are sent, you will be asked to provide further information by contacting the [Support team]([email protected]).
2121
![Contact Support](/images/sendgrid/create_account/contact_support.png)

twilio_sendgrid/04_email_verification.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Email Verification Using SendGrid, Verify and Flask
1+
# Email Verification Using SendGrid, Verify, and Flask
22

3-
When you search how to send emails in flask, you will come across a ton of content on how to do so. Below, you will learn how to utilize Twilio SendGrid to send emails from a flask application.
3+
When you search for how to send emails in Flask, you will come across a ton of content on how to do so. Below, you will learn how to utilize Twilio SendGrid to send emails from a flask application.
44

5-
One possible use case of sending emails is when you want to enforce the authenticity of user emails in your application. A user who keys in their email address will be required to prove that they have access to the email by retrieving a token sent to their inbox.
5+
One possible use case for sending emails is when you want to enforce the authenticity of user emails in your application. A user who keys in their email address will be required to prove that they have access to the email by retrieving a token sent to their inbox.
66

77
### Table of Contents
88

@@ -16,7 +16,7 @@ If you would like to browse the completed project, you can check out the [Email
1616

1717
## Working With SendGrid
1818

19-
At this point you should have a SendGrid account. If not, review [how to create a free account](/twilio_sendgrid/01_create_acccount.md) now. The first step would be to come up with a template for our email. Twilio Verify Service will use this template when emailing verification codes to users.
19+
At this point, you should have a SendGrid account. If not, review [how to create a free account](/twilio_sendgrid/01_create_acccount.md) now. The first step would be to come up with a template for our email. Twilio Verify Service will use this template when emailing verification codes to users.
2020

2121
- From the [SendGrid dashboard](https://app.sendgrid.com/), click on "Email API" located in the sidebar, then select "Dynamic Templates"
2222
![Dynamic templasts](/images/sendgrid/send_emails/dynamic_templates.png)
@@ -54,16 +54,16 @@ When you click the "Create and View" button, an API key will be created. Make su
5454

5555
### Create Email Integration
5656

57-
From now, we will move to our Twilio account to complete the configuration and link it to SendGrid. From the [Twilio Console](https://console.twilio.com/), click on "Verify" Service to access [Email Integration](https://console.twilio.com/us1/develop/verify/settings/email) found in .
57+
From now, we will move to our Twilio account to complete the configuration and link it to SendGrid. From the [Twilio Console](https://console.twilio.com/), click on "Verify" Service to access [Email Integration](https://console.twilio.com/us1/develop/verify/settings/email) found in.
5858

5959
![Email Integration](/images/sendgrid/send_emails/new_api.png)
6060

61-
For the SendGrid API key, you will need to retrieve the earlier copy saved in the `.env` file. The template key is found in your SendGrid Dynamic templates page. Click Save to store the email integration.
61+
For the SendGrid API key, you will need to retrieve the earlier copy saved in the `.env` file. The template key is found on your SendGrid Dynamic templates page. Click Save to store the email integration.
6262

6363

6464
### Create A Verify Service
6565

66-
Explore Twilio's products catalogue to Find "Verify" within the Account Security section. You can pin this to access is easily in future.
66+
Explore Twilio's products catalog to Find "Verify" within the Account Security section. You can pin this to access it easily in the future.
6767

6868
![Explore Products catalogue](/images/sendgrid/send_emails/product_catalogue.png)
6969

@@ -87,7 +87,7 @@ I have already created a sample application we can use to build our project. You
8787

8888
### Install Twilio
8989

90-
Besides the dependancies installed through the _requirements.txt_ file, we will need to also install `twilio` within our active virtual environment. Run this command below:
90+
Besides the dependencies installed through the _requirements.txt_ file, we will need to also install `twilio` within our active virtual environment. Run this command below:
9191

9292
```python
9393
(venv)$ pip3 install twilio
@@ -126,12 +126,12 @@ class EmailForm(FlaskForm):
126126

127127
```
128128

129-
We have used the class `EmailForm()` to define what fields we want, in this case it is only the `email` field together with a `submit` button.
129+
We have used the class `EmailForm()` to define what fields we want, in this case, it is only the `email` field together with a `submit` button.
130130

131131

132132
### Web Form Configuration
133133

134-
To help protect our form from a nasty attack called Cross Site Request Forgery (Csrf in short), Flask expects us to initialize a `SECRET_KEY` configuration. We can do so by creating a `config` module in the top-level directory.
134+
To help protect our form from a nasty attack called Cross-Site Request Forgery (Csrf in short), Flask expects us to initialize a `SECRET_KEY` configuration. We can do so by creating a `config` module in the top-level directory.
135135

136136
```python
137137
(venv)$ touch config.py
@@ -155,7 +155,7 @@ class Config(object):
155155

156156
```
157157

158-
The value is located in another top-level file called `.env` which should not be commited to version control. Its content should remain a secret. Ensure you add it to a `.gitignore` file.
158+
The value is located in another top-level file called `.env` which should not be committed to version control. Its content should remain a secret. Ensure you add it to a `.gitignore` file.
159159

160160
```python
161161
#.env
@@ -218,7 +218,7 @@ The dynamic data `{{ title }}` comes from the title passed when the template is
218218

219219
### Render The Email Form
220220

221-
The routes module is used to combine all logic related to view functions. We will need to update in order for our form to be displayed.
221+
The routes module is used to combine all logic related to view functions. We will need to update it for our form to be displayed.
222222

223223
```python
224224
# app/routes.py
@@ -236,7 +236,7 @@ def index():
236236

237237
```
238238

239-
We begin by importing our `EmailForm` from the forms module, then instantiate it using the variable `form`. It is this variable that is passed,the template, that is used to render our form. If your application is still running, you can refresh the home/index page to see the email form.
239+
We begin by importing our `EmailForm` from the forms module, then instantiate it using the variable `form`. It is this variable that is passed, the template, that is used to render our form. If your application is still running, you can refresh the home/index page to see the email form.
240240

241241
![Email form](/images/sendgrid/send_emails/email_page.png)
242242

@@ -287,9 +287,9 @@ def check_email_verification_token(email, token):
287287

288288
```
289289

290-
To use the Verify API, we first need to get our service's client. This is done handled by our helper method `_get_twilio_verify_client()`. You will need your Twilio account's SID and Auth token seen in your [console](https://console.twilio.com/). You will also need the Verify Service SID as discussed in the section [Create a Verify Service](#create-a-verify-service).
290+
To use the Verify API, we first need to get our service's client. This is handled by our helper method `_get_twilio_verify_client()`. You will need your Twilio account's SID and Auth token seen in your [console](https://console.twilio.com/). You will also need the Verify Service SID as discussed in the section [Create a Verify Service](#create-a-verify-service).
291291

292-
Notice that they are all environment variables. So, we need to update our configurations file.
292+
Notice that they are all environment variables. So, we need to update our configuration file.
293293

294294
```python
295295
# config.py
@@ -318,7 +318,7 @@ TWILIO_VERIFY_SERVICE_ID=
318318
SENDGRID_API_KEY=
319319
```
320320

321-
The `request_email_verification_token()` method contacts Twilio Verify to request for a verification token. A user's email is passed as an argument so that the email can be sent to their inbox.
321+
The `request_email_verification_token()` method contacts Twilio Verify to request a verification token. A user's email is passed as an argument so that the email can be sent to their inbox.
322322

323323
The request process is handled by the `index()` view function as seen below:
324324

@@ -363,9 +363,9 @@ def verify_token():
363363

364364
```
365365

366-
In the token verification page, there will be another simple form with only one field that accepts the numeric code received by a client. Once this form is submited with the code, a call to the method `check_email_verification_token()` is made. If the token is verified, then the user will be redirected to the index page.
366+
On the token verification page, there will be another simple form with only one field that accepts the numeric code received by a client. Once this form is submitted with the code, a call to the method `check_email_verification_token()` is made. If the token is verified, then the user will be redirected to the index page.
367367

368-
Let us begin by creating this new template. We can copy the content of the `index.html` and paste into `verify.html`.
368+
Let us begin by creating this new template. We can copy the content of the `index.html` and paste it into `verify.html`.
369369

370370
```html
371371
<!-- app/templates/verify.html -->

0 commit comments

Comments
 (0)