The A.S.A.P. Library.
Hello, everyone.
Today, we're going to talk about a library called the Asymptotically Library in Eitam.
So obviously this library is usually used to work with the asymptotically protocol and to transmit messages
over the Internet.
So the function that this library uses specifically to transmit messages is called sendmail methods.
So there are few steps that you need to follow in order for you to send an email over Internet using
the same type of protocol.
First of all, you need to use the asymptotic class in order to create an email object.
And here we're going to actually bust the constructor method, which is the hostname.
They we're going to create the mail message.
And finally, we're going to call this a sendmail method that I previously mentioned.
And this in the mail method is already booting into the asymptotically class.
So if you create an object from the A.P. class, you can simply apply this middle is in the email to
the desired receiver.
So if you are not familiar with, for example, who is the host, who is the local host, what ought
we use?
What is the host of the server?
Which one is a local host and so on.
Let's talk a little bit about this.
So the host is the IP address of the asymptotically server.
So actually, if you remember the picture from the previous video, the host is the IP address of the
server.
Then the port is the tunnel between the client and the server.
So in this to twenty five or forty five, we basically establish the connection.
And finally we need the localhost address, which is basically the IP address or in our case, the email
address of the client or the person that is sending the email.
So this is the whole concept between the host port and localhost in here in front of you guys.
I actually provided you with a code that is simply using the async protocol in order to connect to the
different email addresses.
So as you can see first here we import, so we import the same Kippy library.
So this is the first step that we do.
And after we import it now, we can create the asymptotically object.
So here on the next level, we are creating a simple chip name, right.
Aasim type object from the asymptotically class in here.
We're think also we're passing the cost address.
So the Hofstadter's, for example, here is to be at Delta Gmail dot com and then the port for connection.
So in the port for, for a connection in here, which was five hundred and eighty eight.
So this what you do next.
So once we do that now, it is actually very easy to send an email from one e-mail to another so simply
you can use the function sendmail.
So SMPTE pitons in the mail and then you stated the sender, you state of the receiver in your state,
the message that you would like to send.
OK, so here is the actual actual sending the mail.
OK.
And obviously after that you have the SMP exception.
So here's some TV exception.
And the exception is that there were error when sending the message.
OK, so this is why we're doing to try and accept function and then we are creating the asymptotically
protocol.
So this is the basic way for sending mail from local calls to a host, and this is all the steps that
you need to cover in order to do that.
I just wanted to show you how this is done here while the code is simple, because later on I'm actually
going to show you how you can write your own code with your own files so you can see something already
done before jumping into the more complex code.
So just are the basic methods that you're using here.
And so this was everything I want to share with you for today for the same type of protocol.
Also, another interesting thing that I want to.
Share, which was, for example, if you'd like to send the mail too much for response, so let's say
you have a mailing list and you want to send the email to multiple people, you can simply do that by
typing their email with a column.
You can even, for example, write a line called the, let's say, receivers in their type, the emails
of all the people that you would like to send an email.
So, for example, here will be a receiver, one at.
Domain, dot com.
OK, then you can write receiver to put it in parenthesis to a receiver to add domain, dot com and
so on.
And after that, instead of typing to the receiver right here, you can simply write receivers, receivers.
And so in that way, you're basically passing the multiple email lists to the method that is going to
be sent.
It will be the same to them in this section, actually, with practice, if you want to advertise some
of your product to multiple people who keep their email addresses.
So those are the guys I think, that they want to share for you for today.
And in the next video, I'm actually going to show you how you can send an email using the Gmail tool
kit.
And I'm going to login actually to my email and I will show how the system.
That's it.
Thanks very much for watching, guys.
And there with me in the next video, because I promise is going to be very exciting.
Thanks for watching.