 Okay, building on our concept in the last video. I showed you how you can send a text to your phone From your computer using plain old email. It was very simple. You just need to know what carrier You need to know the phone number and the carrier of who you're sending to But now let's look at making that a little more useful. I gave some examples like my doorbell When it's pressed it just sends an HTTP request to my computer wishes an HTTP request to my server That sends an email has a text to my phone let and There's a variety of way to send emails from your phone or from your server But this is just basic example here once you have a web server or on sorry a mail server hooked up set up on your server You can use a basic PHP code. Actually, let me use VIM to go into this So this is actually a trim down my actual script is a little bit longer this and of course I'm using HTTPS. So my transmission is encrypted. I use user login. So I have username password I also use a security key in my actual script and then this is the completion of the script here So I'm leaving out all the security stuff in this example because I don't want you guys to see my security information But this is the information basically what's happening is I can send an HTTP request with the valid a security key and password And username and then I also send a URL in the URL the user that I want to send to I Get that I filter that string out I then get the message and filter it. That's going to filter it's it's gonna sanitize it and I believe that also I think that part it comes through if there's special characters it converts it to you know HTML Encoding I think that's what's doing that. I know that comes through like that anyway So I get the user and I get the message and that's not the security user That's actually the user that's used later on in the script right here with user this and user that my script has Two users in it. So even if I have the right Security key username and password if I don't pass it the crop one of these two users the scripts Just gonna exit but what this doing cuz me my wife both use this script to send things from our computer this is running on my web server and Basically, it's saying if it's Jen we're gonna send to this phone number that way I'm not sending my phone number every time I do one of these requests. It's stored in the file here and If it's if the user is Chris it's now going to send it and we use Google Fi So I think the last few I said it's five at Google to come it's actually msg.fi.google.com And if it's near those users it just says user error and exits But if it is one of these two users and everything else checks out Well now I'm going to send a mail send mail to that phone number with the title or the subject line of desktop and then inside the message It's going to have our message and also echoes out message and that's just for checking What's your color bug checking and actually my next script that I'll show you actually utilizes that so I think it Uses that I haven't have to look at the script. So again, this is the basic of checking the Username so I know what phone number to send to and the message is being sent. This doesn't have any other security features in it Again, I'm not a security expert. I hate talking About security in my videos because I would sound people people always argue no matter how much you know about security Someone always gonna tell you you're wrong. Anyway, that script or something similar that is on my films by Chris server And again protected now on my desktop computer. I have this script or at least a similar version of it that's going to set a URL of Where that script we just looked at is on my web server Next it's going to use X clip To see what I have last thing I highlight the last thing I selected My computer is set to user Chris. My wife's computer is set to user Jen. Then we do a very basic URL W get Then yeah, it's not checking the output from the server Then I send a notification to my desktop with a phone icon that displays there for five seconds That says sent a phone and then it will tell me what message was sent to phone Now with my desktop interface and pretty much every desktop interface on Linux will allow you to create shortcut keys for scripts Now that I have that script saved and I have it saved in my user local Bin folder so that path is in my path directory so I can run that command from anywhere on my computer so if I was to highlight this and I type in to phone I hit enter and it told me That text was sent to my phone five seconds later that message go away That means I know it went my phone is on silent, but I'll check right now. Yes I did receive that notification again It usually takes five to ten seconds for for to get to the phone I've never had to take more than ten seconds But I have set that to a shortcut key of my modifier key which is on my case my windows key the key with the little Windows logo on it unfortunately and The the letter s so I can highlight a bunch of text I can highlight a URL or a bunch of text and I can then just hit Windows key s and now all that text was just sent to my phone and Let me check my phone. Oh, yeah I have my phone silent and that's silent actually just ran out just as I said that but you heard that go through Let me silence it again so that I Don't get any other messages while I'm recording here that will interrupt And now actually I'm going to Yeah, I'm gonna I'm gonna turn it back on that way you can see how long it takes for the message to get there You should be able to hear it come through to my phone mark that one is red. I Accidentally click pause on my recording. Okay, actually what I want to do now I'm actually gonna turn notifications back on that way you guys can hear how long until The message gets there, so I'm just gonna highlight some text I'll highlight this here and I'll hit Windows s on my machine. It says it's sent. Let's wait for it There you go. What was that five seconds? And that's that's probably about average and again at most ten seconds for it to get there This is also very useful if you want to send URLs So for example if I go to films like Chris comm I can highlight again if you click it in the Textbox here in the address bar it looks like it's highlighted. It actually hasn't been selected yet You have to select it you can double-click it or highlight it once I've done that I hit Windows s and I just sent myself that URL now let's see There you go, and Again, if you watch my first video, I have another shortcut key for ten years So let's say this URL was really really long All I have to do is hit Windows t wait for that box come up Windows s and I just sent the tiny URL to my phone There we go So as you can see Creating shortcut keys and be able to grab stuff from the clipboard makes things so easy because as soon as something's highlighted I can just send it to my phone and it's just this could be a whole bunch of text I don't know the the limit it probably would break it up into multiple texts But I can highlight multiple page multiple things. So if I cat out this little script here I can highlight all this and when I Windows s it's gonna send all that text to my phone and it just makes things super simple and again if I was to go to Linux comm I can Take that and again, let's say that was a long URL actually. Let's let's try something. Let's go Linux Journal I'm just looking for something with a longer URL. I want to go to there like forum or something Topics mobile Let's go here. Okay. So it's not a very long URL, but let's say I want this I just do that I go Windows t Windows s and I just sent myself a tiny URL So again watch my previous video for my script on tiny URL code and that's like grabs from your clipboard and gets you a tiny URL Super duper simple super super use super duper useful Again, I have my own web server set You can actually create scripts that will log into your Gmail and other email accounts and send it So if you don't have a web server there are ways to do that I'm not going to go into the detail of the server side of things But it's very simple to use W get to do an HT HTML request that and then your server can send out email and again the send the notify send again I always say that backwards notify send makes it very easy because if you're not running the shell Then I don't you don't know if the script ran or not if you don't have any output So I get that dialogue box if that box comes back blank or it doesn't cope come up at all I know that something went wrong and I can I can troubleshoot from there, but that's it again visit films by Chris comm that's Chris the K you can search through all my videos there and You can also go to the support section and there you can sort me support me through PayPal or patreon I really do appreciate the support more support. I get more videos I get trying to knock out a lot of videos right now while I'm home injured So that I can post a lot of them in November December Which is probably when you're watching this if you're a patreon viewer you're watching it before everybody else keep that in mind Thank you for watching as always. I hope that you have a great day