WEBVTT

00:03.790 --> 00:04.300
Hey there.

00:04.300 --> 00:05.680
Everyone had their share.

00:05.710 --> 00:07.330
Welcome to Another Theory video.

00:07.330 --> 00:11.710
And in this video, we're going to take a little bit lightweight and we're going to talk about the images

00:11.710 --> 00:13.540
and mail for the images part.

00:13.540 --> 00:15.550
We have already created a dedicated section.

00:15.550 --> 00:17.020
In case you haven't watched that.

00:17.020 --> 00:18.970
Hey, please just follow the flow of this course.

00:18.970 --> 00:20.620
This is very important for this course.

00:20.620 --> 00:23.800
So we are already quite familiar with the cloud native format.

00:23.800 --> 00:25.720
And it's not just about cloud entry.

00:25.720 --> 00:29.560
You have a full understanding of how images are being transferred to one or other.

00:29.590 --> 00:33.970
Now you can just throw images onto a WAC firebase whatever comes to your way.

00:33.970 --> 00:34.990
So that is nice.

00:35.170 --> 00:39.910
Another thing that we are going to work on is the node mailers, so obviously you'll be sending some

00:39.910 --> 00:40.330
mail.

00:40.340 --> 00:44.650
So it is very important for you to understand the mailing and I'll share some of the personal story,

00:44.650 --> 00:49.750
a kind of a small incident video for the mail we are going to use all time favorite node mailer.

00:49.750 --> 00:56.800
Yes, there are other services as well, but Node Mailer is all time hands down, one of my favorite.

00:56.830 --> 01:03.010
So what you got to do for this node mailer obviously and beam install node mailer and after that, the

01:03.010 --> 01:08.470
things are really easy and all you need to know is this example, not even entirely, just a few bits

01:08.470 --> 01:10.450
and pieces of it, and that's pretty much it.

01:10.600 --> 01:15.610
So what happens in the Node mailer once you have kind of a required the node mailer at the top, all

01:15.610 --> 01:19.540
you got to do is inside this node mailer, you get two methods.

01:19.540 --> 01:23.050
And yes, these two methods are only thing that you need to study here.

01:23.230 --> 01:26.320
So the first thing is create transporter.

01:26.320 --> 01:31.720
Now this is some guy just imagine you are creating a van which is going to deliver your mails.

01:31.720 --> 01:34.150
So this mail is called as transporter.

01:34.150 --> 01:35.200
That's all you got to do.

01:35.230 --> 01:38.680
Now in this kind of a van, you need to fill up some of the information.

01:38.680 --> 01:43.090
You can say that we need to fix some tires and put some gas into it and all of that.

01:43.090 --> 01:45.640
So all you need to do is provide a host to it.

01:45.640 --> 01:49.330
And this host information comes up from whatever your mail provider is.

01:49.630 --> 01:51.790
It may be send in blue, it may be a W.

01:51.820 --> 01:55.060
S, there are a whole lot of mail providers available.

01:55.060 --> 01:57.490
Depends on which one is giving you the cheaper mail service.

01:57.490 --> 02:04.240
You can go ahead and use that so you require a host port and these to information host port.

02:04.510 --> 02:07.330
We majority the time we don't use the secure as false.

02:07.330 --> 02:10.210
But you can actually go ahead and use the port for that.

02:14.130 --> 02:18.150
And on top of that, you definitely give your account information which is in the auth section.

02:18.150 --> 02:19.710
So you give your user and pass.

02:19.710 --> 02:24.450
And these are usually kind of a token, not actually the password, but sometimes it can be password

02:24.450 --> 02:24.960
as well.

02:24.960 --> 02:27.600
So these are the basic information and that's it.

02:27.630 --> 02:31.830
Now the good thing is this exact information is given to you by Send in Blue.

02:31.860 --> 02:37.410
It is given to you by eight of Lewis's service and a whole bunch of other services as well.

02:37.560 --> 02:39.380
And this is the most beautiful thing.

02:39.390 --> 02:41.490
I'll tell you some information on that in a second.

02:41.490 --> 02:47.250
So once the transporter is ready, you hold the reference of this created transporter into this transporter

02:47.250 --> 02:49.350
variable or whatever you're calling that variable.

02:49.500 --> 02:54.330
And after that, all you got to do is just use this variable and say, send mail.

02:54.600 --> 02:56.280
Yeah, that's it, that's it.

02:56.280 --> 02:57.390
That's all you say.

02:57.390 --> 03:02.700
And in this, obviously you pass on some of the basic information like from which says where you want

03:02.700 --> 03:05.820
to send it to from where it is coming in.

03:05.820 --> 03:10.530
And then the subject obviously then the text or you can send some HTML part as well.

03:10.890 --> 03:15.210
The reason why we send the text in HTML, you might have seen some of the information where you say,

03:15.240 --> 03:19.710
hey, forgot your password or reset your password, and then it says, if the button is not working,

03:19.710 --> 03:22.770
just copy paste this particular code into your URL.

03:22.770 --> 03:26.130
And that's why exactly we send some of the text information as HTML.

03:26.160 --> 03:29.250
Maybe it's HTML hasn't properly rendered in the button format.

03:29.250 --> 03:33.480
So we might want to give the user the entire text so that he can copy it and paste it in the browser

03:33.480 --> 03:34.830
at least can the job done.

03:34.830 --> 03:36.900
So this is all this is all it takes.

03:36.900 --> 03:38.820
Now, sharing a personal information.

03:39.060 --> 03:44.400
Once I was working in a company and suddenly it was actually blocked over all of email, communication,

03:44.400 --> 03:46.740
everything for some bizarre reason.

03:46.740 --> 03:51.090
Now our founder actually got a little bit panicked that, hey, entirety of the email services done

03:51.090 --> 03:51.750
what we need to do.

03:51.750 --> 03:53.370
I said nothing much.

03:53.370 --> 03:55.470
We just need a new email service.

03:55.470 --> 04:01.470
We immediately signed up and within just 2 to 3 minutes I just changed this information into the environment

04:01.470 --> 04:02.520
variables and that's it.

04:02.520 --> 04:03.990
Everything was working fine.

04:03.990 --> 04:10.590
Surely we paid a little bit extra to the service that we opted in right now because it was a big company

04:10.590 --> 04:15.690
and they were having huge number of emails going on, but within 5 minutes we were all back up and running

04:15.690 --> 04:20.370
and that's when I requested our founder that, Hey, can you please actually support a bit to the Node

04:20.370 --> 04:21.510
Mailer project as well?

04:21.540 --> 04:24.000
Can you send something to his PayPal account or something?

04:24.000 --> 04:29.910
And he sent $100 to it that hey, this, I have sent $100 because it is it was recommended by you.

04:29.910 --> 04:32.910
So I think there is something really important that saved us that day.

04:32.910 --> 04:37.500
So, yes, Node Mailer is that good of a project that I recommended my senior to support him a little

04:37.500 --> 04:37.860
bit.

04:37.860 --> 04:41.670
So again, I tell you that this is one of the easiest way of handling the email.

04:41.670 --> 04:42.750
Please don't panic out.

04:42.750 --> 04:45.780
It's really the easiest thing just because you haven't handled it.

04:45.780 --> 04:47.790
That's why it's a fear of unknown.

04:47.790 --> 04:49.410
So that's all what we'll be doing?

04:49.410 --> 04:49.770
Yes.

04:49.770 --> 04:53.490
We'll be using Node Mailer and we'll be using cloud native for images cloud.

04:53.760 --> 04:58.350
I haven't much deployed it in the production yet, but it has a great reputation.

04:58.350 --> 05:02.040
You can use SES eight s buckets as well.

05:02.040 --> 05:03.780
You can go ahead and use something else.

05:03.780 --> 05:05.280
It's kind of one of the same.

05:05.370 --> 05:06.540
That's it for this video.

05:06.540 --> 05:08.370
Let's go ahead and catch up in the next one.
