Now that we have created a plaintext email, let's learn how to create.
My message, an e-mail, you will use the very same coding data, the message, and inside here, you
add your first annual add through to means you will you are passing Astrium Alcalde.
False means you are passing plain text now since we did right through here.
Let's remove the comment.
We can add e-mail here and two additional code.
We have to get a simple code to begin with.
So here is an online code editor and you can use this one or this one W three school or the online code
editor.
This one.
So if you want to use this one.
As you can see, this is the online editor for this website, you can write your text and.
Right here and see it here, see what's happening here.
So to all this text, you can edit the heading, this is the headings, you can write your name and
click run and will be visible here.
Same for other things.
Or you can simply try this one.
You can start writing Hello, World.
E.S.P, 32 a.m. this thing, and you can simply copy this code.
This is a simple code for this line, you can add other information, you can.
How long it takes to be in the middle, you can increase the font size or change the font color.
You can choose different formats if you want to make it as hidden as you can see.
That's more the background color and add a red color for the text itself.
Now you can copy all of this and simply based it inside your code, right.
Click and copy.
Then go inside your code.
Base it right here.
As you can see, this is our Astrium alcalde.
Now.
You can use this or you can use the raw text, it's up to you in my case, I will start with the raw
text, then we can text with e-mail.
Now, let's move on with code editing.
Now, the final step is setting the recipient email address.
So like a Stoebe data dot and the recipient.
And inside it, all right, email re sibilant.
That's it now that we have all the details of this and T.B. data, we are ready to send the email.
So to send the email, you need to write if.
Statement and inside, if you need to write this Manicaland, don't send email.
We are using the send email function and we are passing this MTBE data that we already filled here and
these lines.
Now.
After that, we can print Syria, not print, Alan.
If there is an error, we can see error.
And sending the email and we can give the error code from the mail fly and you can light mail client
dot as MTBE or Rezo.
This is how you can give that email all, it will most likely print out a code that you can look up
using Google to know exactly what's a problem.
After sending the email, you can clear all the data from this MTBE that object.
And we can do this using one single line, which is MTBE, that empty the empty function is the one
that we can use to send empty emails.
Now we are sending the email and the step function, this means that the email will be sent once and
you have to pause to unplug, then plug it again.
They ask people to send another email.
If you want to send the email more than once, you can simply use this method to send email methode
inside the loop function.
Now, for example, the loop function is empty.
Now we can start this thing, this cold out, but we can add even more stuff in the loop function now
you can create a callback function to get the email sending states to do that.
There is a very.
Easy method, you can simply define a callback function like void.
Let me show it to you.
Let's create a new function and name it send call back.
No.
The callback function will have a simple chord.
We are going to write the serial masterbrand plan and here we are going to write the message that four.
And we need to pass the message here.
Send a status
message now when the ServiceMaster is sent.
We call it an statement and this statement will include the message is success in sending.
Then we need to write, I think, for the bugging inside.
OK, we can't light the signs.
This means that the message was sent successfully, otherwise the message will we will get a code or
a. MTV terrorism called on our serial murderer.
Now, this is how you can create a callback function to get the email sinding status.
Sorry.
Now, that's it, what you need to do next is very simple, you need to verify the code to make sure
that it doesn't have any errors, then we will upload the code to our ISP board.
It will take a few seconds to compile the code.
OK, as you can see here, have an arrow as MTV support was not defined in this school.
Let's make sure that we have.
That SMTP server port.
Oh, we have some T.P.
Let's go back and fix it.
As A.B. Spellman reports.
OK.
That's right.
Now, let me also add my e-mail passwords here.
Now, let's combine it.
OK, now done combining the next step is uploading the code to our E.S.P board and see if the email
is sent or not.
Now, we will do this in the next lesson, but that's it for this lesson.
If you have any questions, please ask in the Q&A board.
This is Ashara from educational engineering team.