1
00:00:02,360 --> 00:00:07,490
Now that we have created a plaintext email, let's learn how to create.

2
00:00:09,480 --> 00:00:23,970
My message and I still you will use the very same clothing that the message and inside here you will

3
00:00:23,970 --> 00:00:30,420
add your taste annual ad through through means you will you are passing a cell Alcalde false means you

4
00:00:30,420 --> 00:00:31,920
are passing plaintext.

5
00:00:32,610 --> 00:00:38,930
Now, since we did right through here, let's all the comments we can.

6
00:00:39,450 --> 00:00:44,310
This time, I'll call it here and two additional code we have to get as general code to begin with.

7
00:00:44,700 --> 00:00:54,360
So go here like Stand STEM Online Code Editor, and you can use this one or this one.

8
00:00:55,210 --> 00:00:58,200
W3 School of Online Code Editor.

9
00:00:59,800 --> 00:01:00,280
This one.

10
00:01:01,410 --> 00:01:03,540
So if you want to use this one.

11
00:01:05,600 --> 00:01:09,470
As you can see, this is the online editor for this website.

12
00:01:09,950 --> 00:01:12,050
You can write your text and.

13
00:01:13,260 --> 00:01:17,880
Right here and see it here, see what's happening here.

14
00:01:19,080 --> 00:01:21,750
So did this text, you find it in the heading.

15
00:01:21,960 --> 00:01:28,950
This is the headings you call out your name and click run and will be visible here.

16
00:01:29,520 --> 00:01:30,860
Same for other things.

17
00:01:30,870 --> 00:01:32,730
Or you can simply try this one.

18
00:01:33,270 --> 00:01:37,440
You can start writing Hello world.

19
00:01:41,460 --> 00:01:43,330
PSP 32.

20
00:01:44,560 --> 00:01:51,240
Email this thing and you can simply copy the code.

21
00:01:52,710 --> 00:01:55,380
This is that simple code for this line.

22
00:01:55,770 --> 00:01:58,590
You can add other information you can.

23
00:02:01,120 --> 00:02:06,820
Line the Turks to be in the middle, you can increase the font size or change the font color.

24
00:02:08,090 --> 00:02:13,190
You can choose different formats if you want to make it as heading as you can see.

25
00:02:15,750 --> 00:02:20,070
This more the background color, and let's cut off from the text itself.

26
00:02:20,490 --> 00:02:29,370
Now you can copy all of this and simply paste it inside your code, right click and copy, then go inside

27
00:02:29,370 --> 00:02:29,970
your code.

28
00:02:30,430 --> 00:02:31,760
Base it right here.

29
00:02:33,320 --> 00:02:36,290
As you can see, this is our national cold.

30
00:02:39,600 --> 00:02:40,110
Now.

31
00:02:41,130 --> 00:02:45,960
You can use this or you can use that old text, it's up to you.

32
00:02:46,380 --> 00:02:48,600
In my case, I will start with robotics.

33
00:02:48,960 --> 00:02:50,940
Then we can test with a stem cell.

34
00:02:51,750 --> 00:03:02,580
Now let's move on with cord editing now, the final step is sitting the recipient's email address.

35
00:03:03,180 --> 00:03:09,810
So like a simple TB data, the add recipient.

36
00:03:13,970 --> 00:03:18,770
And inside its right email, Rudy said beyond.

37
00:03:23,470 --> 00:03:31,480
That's it now that we have said all the details of this and TB data, we are ready to send the email.

38
00:03:31,900 --> 00:03:35,020
So to send the email, you need to write if.

39
00:03:37,320 --> 00:03:49,580
Statement and inside that if you need to drive this man client to send email, we are using the send

40
00:03:49,590 --> 00:03:57,720
email function and we are passing this empty B data that you already filled here and these lines.

41
00:03:59,650 --> 00:04:00,190
Now.

42
00:04:01,410 --> 00:04:07,080
After that, we can't print Syria, not print alone.

43
00:04:09,220 --> 00:04:13,160
If there is an error, we can see error.

44
00:04:16,390 --> 00:04:29,050
And sending the email, and we can give the records from the mail flying, you kind of like man client

45
00:04:29,890 --> 00:04:35,860
dot TBE error reason.

46
00:04:37,900 --> 00:04:38,440
And.

47
00:04:39,610 --> 00:04:44,180
This is how you can give that email address.

48
00:04:45,610 --> 00:04:51,520
It will most likely print out a code that you can look up using Google to know exactly what's the problem.

49
00:04:52,210 --> 00:04:56,980
After sending the email, you can clear all the data from this empty be that object.

50
00:04:57,610 --> 00:05:04,690
And we can do this using one simple line, which is a simple TB that are just empty.

51
00:05:04,870 --> 00:05:09,670
The empty function is the one that we can use to send empty emails.

52
00:05:11,040 --> 00:05:13,770
Now we are sending the email and the staff function.

53
00:05:14,160 --> 00:05:22,430
This means that the email will be sent once and you have to pause to unplug, then plug it again.

54
00:05:22,480 --> 00:05:24,450
They ask people to send other e-mail.

55
00:05:24,900 --> 00:05:32,010
If you want to send the email more than once, you can simply use this method to send e-mail methode

56
00:05:32,370 --> 00:05:33,690
inside the loop function.

57
00:05:34,260 --> 00:05:37,500
Now our example the loop function is empty.

58
00:05:38,890 --> 00:05:48,460
Now, we can't start this thing this cold out, but we can add even more stuff in the loop function.

59
00:05:49,570 --> 00:05:54,070
Now you can create a callback function to give the email sending status.

60
00:05:54,610 --> 00:05:56,320
To do that, that is a very.

61
00:05:57,380 --> 00:06:03,020
Easy method, you can simply define a callback function like void.

62
00:06:04,550 --> 00:06:05,630
Let me show it to you.

63
00:06:08,670 --> 00:06:14,670
Let's create a new function and name it St. Paul, but.

64
00:06:18,020 --> 00:06:18,500
Now.

65
00:06:21,290 --> 00:06:31,420
The callback function will have a symbol called we are going to write on the serial monitor print alone.

66
00:06:32,830 --> 00:06:36,340
And here we are going to write that message and for.

67
00:06:39,080 --> 00:06:41,150
And we need to pass the message here.

68
00:06:46,370 --> 00:06:49,700
Send status

69
00:06:52,070 --> 00:06:52,570
message.

70
00:06:53,420 --> 00:07:01,910
Now, when the city's message is sent, we call out an if a statement, this if statement will include

71
00:07:01,910 --> 00:07:06,050
the message as success and sending.

72
00:07:07,970 --> 00:07:15,790
Then we need to write, I think, for the bugging inside.

73
00:07:18,440 --> 00:07:18,800
Okay.

74
00:07:19,040 --> 00:07:20,870
We can't hide the signs.

75
00:07:22,380 --> 00:07:25,960
This means that the message was sent successfully.

76
00:07:26,430 --> 00:07:36,450
Otherwise, the message will we will get a code of honest, empty, be at what reason poured on our

77
00:07:36,450 --> 00:07:37,170
serial monitor.

78
00:07:37,860 --> 00:07:43,320
Now this is how you can get a callback function to give the email sending status.

79
00:07:43,800 --> 00:07:44,190
Sorry.

80
00:07:45,960 --> 00:07:50,000
Now that's it, what you need to do next is very simple.

81
00:07:50,020 --> 00:07:53,460
You need to verify the code to make sure that it doesn't have any errors.

82
00:07:54,270 --> 00:07:59,060
Then we will upload the code to our ISP board.

83
00:08:12,640 --> 00:08:15,430
It will take a few seconds to compile the code.

84
00:08:33,330 --> 00:08:33,840
OK.

85
00:08:34,110 --> 00:08:41,670
As you can see here, have an error, some TV server port was not defined in this school.

86
00:08:43,740 --> 00:08:45,840
Let's make sure that we have.

87
00:08:46,990 --> 00:08:50,830
That I assume to be said over the past.

88
00:08:53,260 --> 00:08:56,530
Well, we have spilling some type.

89
00:08:59,880 --> 00:09:02,300
Let's go back and fix it.

90
00:09:07,060 --> 00:09:09,070
As A.B. said, what pushed?

91
00:09:09,310 --> 00:09:09,820
OK.

92
00:09:10,300 --> 00:09:10,930
That's right.

93
00:09:11,960 --> 00:09:16,670
Now, let me also add my e-mail passwords here.

94
00:09:19,570 --> 00:09:20,830
Now let's combine it.

95
00:09:33,340 --> 00:09:41,890
OK, now done, combining the next step is uploading the code to our yes people and see if the email

96
00:09:41,890 --> 00:09:43,090
is sent or not.

97
00:09:43,390 --> 00:09:46,720
Now we will do this and the next lesson, but that's it for this lesson.

98
00:09:46,730 --> 00:09:53,740
If you have any question, please ask in the Q&amp;A about this is Ashraf from educational engineering team.
