All language subtitles for 012 Using Sendgrid for _Real_ Emails_Downloadly.ir_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

So, let's now use the Sendgrid service

in order to send real emails to real email inboxes.

Rather than to our development inbox at Mailtrap.

And so, let's open up a new tab here

and search for Sendgrid and then it is here,

SendGrid.com

All right, so we can try it for free.

It will then have some limits

but you can still create a free account

from which you can send like, one hundred emails per day.

All right, so go ahead and create your account here

and once you're ready come back to this video.

Okay, and after creating your account

you should see your dashboard

that should look something like this, all right?

So you see there's a ton of stuff here on the left side

you can choose like templates, you can see all kinds

of statistics about the emails that you're sending.

And really, there is a ton of settings

that you can also set here, okay?

But for now, what we are interested in,

is in the Set up Guide.

Okay?

So here in the top left corner of your dashboard

you should have this menu here

where we then want to click the Set up Guide.

Now if the page at the time you're watching this video

looks somewhat different,

then you might also find the Set up Guide link

somewhere down here.

And in this case here on the sight side.

So let's open that up and now what we want to do is here

to integrate using our Web API or SMTP relay, all right?

And you could also easily integrate Sendgrid

into Wordpress or Drupal or something like that.

But of course, that's not what we want.

So here we want the first option

and then we want the SMTP Relay.

Because that is the one that we need

if we want to use node mailer

and create a transport with that.

And so that's exactly what we're doing

and so we choose this one.

On the other hand, we could also use

the simple to use Sendgrid API

and so then we would choose this way.

But again, with node mailer we need to choose

this option here.

And then from here it's very easy.

So here we just need to create an API key with some name.

And so that name is not really relevant at all,

so let's just call it "natours".

Create Key.

And so now to configure or transport a node mailer

all we need is actually this user name and this password.

So let's add these two to our config file

so I'm copying the password and the user name is "apikey."

So, config.env

and then everything that's related to emails,

let's put that here.

So SENDGRID

USERNAME

is apikey.

And Sendgrid PASSWORD

is this one.

And once more I really ask you

to create your own account and your own API key

and password instead of using mine, okay?

Because if many people do that,

it will quickly stop working for everyone, all right?

So please create your own account

and generate your own password, okay?

So there is actually enough for us to create or transport.

And so let's do that here,

so node mailer.createTransport.

And now, remember how I told you when we first created

this email handler a couple of seconds ago.

That there are some services that are already predefined.

And Sendgrid is actually one of them.

So we can specify service and then set it to Sendgrid.

All right?

And we actually did this before for Gmail

and with that all we needed to then pass in

was the user name and a password.

And so here is going to be exactly the same.

And that's the reason why we actually don't even need

to specify the Server and the Port, okay?

Because node mailer already knows this data

because is specifying this Sendgrid service.

So now, we just need to specify the authentication

and the user is at process.env.SENDGRID

USERNAME.

And now let's just duplicate this here

and here, pass.

Okay, and that's actually it.

And now to test this, let's create a new user

with a real email address.

So we go to Postman and let's close all of these here.

All right,

and so I will create "Jonas."

And now as the email address I will create one of these

disposable emails which is basically an email address

and an inbox for which we don't even have to sign up.

So, we're going to use the Mailsac service.

So that goes like that,

and so here we can now really put anything.

So let's just put "Jonas"

and then everyone can access this, all right?

So I will now register with this email address

and so the welcome email should then end up in this inbox.

And you of course, when you're testing this on your own

can of course use your own email address for this, okay?

So go ahead, create a user basically for yourself

with your own email address, and then hit "Send."

And so now our email should be sent using SendGrid.

And now that might take a little bit of time

but let's reload here, maybe it's already there.

And actually it's not.

So let's take a look at here our dashboard.

And from my experience,

this actually doesn't work right away.

So for example this "EMAILS TODAY" number here

always takes some time to actually update.

And also the first emails that you send,

they not always actually show up where they should.

So this behavior that we're seeing here is kind of normal.

But let's try this again, so we still got no email here.

But actually the reason for that is

that remember that this transport is only going to work

in production and so actually we need

to run our application in production.

Which right now we are not doing.

So let's now do that,

npm run start production,

and so let's now actually try that again.

So first I'm going to delete the user that we just created.

So it's this one here,

and actually let me delete all of these

that we don't really need,

so all these test users.

All right, and so now let's try this again

with this email address.

And that is still successful and now let's take again

a look at our email inbox.

We look that, and now we get one message!

So, when we open that, then here it is.

Now for some reason, this application

is doing something weird with this button here.

So it seems like they are applying

their own styles here to this email.

But nevermind, what matters here

is that it did actually worked.

And so now, we send our very first email

using Sendgrid to a real inbox.

Now let's just see if it actually shows up here as well.

But as I said, sometimes that takes sometime to show up.

So as I mentioned before, it still shows zero emails here

while in fact, we already sent and received one email.

Okay.

So great, so with this you can now send

up to one hundred free emails, I believe.

It says something here, yeah.

So with the trial, that you just started

I think it's even more,

it's like thousands of emails per day.

But the after some time, you get downgraded

to just one hundred.

So if you have a real app and a real company,

of course you'll have to pay for this one (mumble).

But then at that point, that's also no problem hopefully.

Anyway, this now wraps up our part about sending emails.

And in the rest of this (mumble), we're now gonna be talking

about accepting payments with credit cards

and creating bookings in our system.

So that is really really exciting and so,

I hope to see you there soon.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.