1 00:00:00,780 --> 00:00:08,160 Hi, welcome back and this lecture, we will discuss how it is actually being sent, the answer to this 2 00:00:08,160 --> 00:00:09,720 question is the following. 3 00:00:10,170 --> 00:00:20,750 You log in to your email account and completes the empty prerequisites for your email account to send 4 00:00:20,760 --> 00:00:26,490 an email like to, which is to write the email address. 5 00:00:26,490 --> 00:00:37,140 You were sent to your email then CCE, which is also additional recipient to your email subject, which 6 00:00:37,140 --> 00:00:38,970 is the title of your email. 7 00:00:39,150 --> 00:00:49,020 Then you start writing your message and click send after you have finished your message. 8 00:00:49,380 --> 00:00:58,650 But what is really happening and what the front and the back end, which are the actual sender and the 9 00:00:58,650 --> 00:00:59,390 recipient? 10 00:00:59,520 --> 00:01:07,860 Let's try to imagine sender, which is servers of our sender, email account company, for example, 11 00:01:08,010 --> 00:01:18,360 Gmail, and which will send your email and serve to send lest the recipient as the server of the recipient 12 00:01:18,360 --> 00:01:21,080 account, for example, Yahoo! 13 00:01:21,330 --> 00:01:32,460 Or any other email company which will receive your email and store it to the inbox list of this receiver 14 00:01:32,460 --> 00:01:33,180 account. 15 00:01:33,420 --> 00:01:42,210 So you send your email using the server of the Gmail company and the recipient will receive the email 16 00:01:42,210 --> 00:01:44,760 using the servers of Yahoo! 17 00:01:45,270 --> 00:01:48,250 Email company and vice versa. 18 00:01:48,630 --> 00:01:57,930 This process will take place using as B sample mail transfer protocol, which we have installed inside 19 00:01:57,930 --> 00:01:59,640 out by some three words. 20 00:01:59,640 --> 00:02:08,070 And using BEP three, we will create your Gmail account and your Yamhill email account them make them 21 00:02:08,070 --> 00:02:11,530 less secure using setting as the following. 22 00:02:12,270 --> 00:02:25,050 We will use Google search to Google Yahoo man and then will create new Yahoo made at the following. 23 00:02:25,470 --> 00:02:30,630 Click on the first link, then click create new account. 24 00:02:31,140 --> 00:02:42,300 Then you will ask you to type your details in spaces that Yahoo mail specify it for you to type. 25 00:02:42,300 --> 00:02:45,900 And so are you finishing adding all your details. 26 00:02:45,900 --> 00:02:53,790 You will click on Continue, which is the blue bottom and the bottom of the web page. 27 00:02:53,910 --> 00:02:58,200 Click on accounting will take and account security. 28 00:03:00,310 --> 00:03:12,850 Then in the bottom of this page, we found generate a password's, we we click on this option and select 29 00:03:12,850 --> 00:03:14,380 other and then. 30 00:03:15,730 --> 00:03:24,790 Five in the name of our new python, a business e-mail list, and click on it to generate a password 31 00:03:24,790 --> 00:03:27,570 for this new Python app. 32 00:03:28,790 --> 00:03:40,970 Which will make it able to send email and log in to Yahoo account, then copy this password and click 33 00:03:41,150 --> 00:03:41,650 done. 34 00:03:42,470 --> 00:03:49,610 Now we will head over Google Search again to create your Gmail account, the following. 35 00:03:50,810 --> 00:03:53,330 Click on, uh, Gmail. 36 00:03:55,290 --> 00:04:00,300 Then let create your account or sign up. 37 00:04:01,640 --> 00:04:03,690 Zanti Venuti tells. 38 00:04:05,020 --> 00:04:14,770 And the is specified for that, as you know, first name and last name and your user name and Gmail 39 00:04:14,890 --> 00:04:19,690 and password and confirm this password and click next. 40 00:04:19,960 --> 00:04:27,610 Now, that is an option to add in your phone number and your birthday in the four months, then days 41 00:04:27,610 --> 00:04:28,170 and years. 42 00:04:28,390 --> 00:04:31,840 And you're, again, just a few hope. 43 00:04:31,900 --> 00:04:35,260 So then you click next. 44 00:04:35,860 --> 00:04:43,430 Now, you should agree on the terms and conditions of the Gmail account. 45 00:04:43,690 --> 00:04:47,260 Now we have created new Gmail account. 46 00:04:48,750 --> 00:04:49,840 But what next? 47 00:04:51,860 --> 00:05:02,840 The next step to make this email account or Gmail account to be less secure by clicking on Gmail account 48 00:05:02,840 --> 00:05:11,960 and manage your account, then security, then ensure that the option of use your phone to sign and 49 00:05:11,960 --> 00:05:20,570 to step verification that you are OK, then make our email secure and the option of less secure app 50 00:05:20,630 --> 00:05:21,410 access. 51 00:05:21,920 --> 00:05:25,470 Click on it, then turn this option on. 52 00:05:25,550 --> 00:05:34,780 Now you can use that to account and the Python code to send emails from one to another and vice versa. 53 00:05:35,330 --> 00:05:40,730 We will jump in sublime text and complete our code as the following. 54 00:05:40,910 --> 00:05:46,510 The first step, as we say before, to import s empty B lap. 55 00:05:46,760 --> 00:05:52,580 So from s empty D lab and board s m db. 56 00:05:52,580 --> 00:06:01,220 In our case, my email or my underscore equal then between two Central Coast or the West Coast, we 57 00:06:01,520 --> 00:06:04,520 must fight them and we will send. 58 00:06:05,740 --> 00:06:07,210 Our email from. 59 00:06:08,720 --> 00:06:14,390 So we will dive team Utech Academy at Yahoo! 60 00:06:14,960 --> 00:06:25,400 Dot com, and in the next line we will declare and assign a variable called Connect Underscore Server 61 00:06:25,970 --> 00:06:26,600 Equal. 62 00:06:28,530 --> 00:06:33,810 As MTV, in our case, between two parentheses. 63 00:06:37,550 --> 00:06:40,250 And to single or double quotes. 64 00:06:41,640 --> 00:06:44,210 That's the name for Yahoo! 65 00:06:44,520 --> 00:06:45,640 Or the sender. 66 00:06:46,710 --> 00:06:55,590 If your sender is a Yahoo, you will add the hostname for a Yahoo as the following, you will type hostname 67 00:06:55,590 --> 00:06:56,540 for Yahoo! 68 00:06:57,300 --> 00:06:58,620 And the Google search. 69 00:06:59,800 --> 00:07:10,450 That will return those to me that you want for me, for example, will be as MTV dot. 70 00:07:12,440 --> 00:07:13,880 Gmail dot com. 71 00:07:18,620 --> 00:07:24,830 And Fauria, who has MTV, dot, dot, yahoo dot com. 72 00:07:33,380 --> 00:07:40,160 Jimenez and A.B. dodgy mint.com, as I said, and Yahoo! 73 00:07:40,160 --> 00:07:43,100 As MTV dot m. dot yahoo dot com. 74 00:07:45,380 --> 00:07:52,040 This is IV for our exemptive server. 75 00:07:55,250 --> 00:08:07,750 Then again, the next line, I will magnify my code to be ultrathin and more visible and clear for you, 76 00:08:08,600 --> 00:08:12,170 then we will declare another variable called password's. 77 00:08:14,070 --> 00:08:17,100 To be equal, the best word of the. 78 00:08:18,000 --> 00:08:26,910 App we created and generate its password and Yahoo mail security. 79 00:08:28,620 --> 00:08:39,630 Cap, sorry for adding around password for Yahoo mail, which will be corrected after I will finish 80 00:08:40,110 --> 00:08:40,800 my call. 81 00:08:40,930 --> 00:08:45,240 Now we will focus on completing our code as the following. 82 00:08:47,310 --> 00:08:58,920 So we will initiate a method that will encrypt our that will be sent using this Python code as the following. 83 00:08:59,310 --> 00:09:04,810 So Connect underscored server dot star to unless. 84 00:09:06,070 --> 00:09:16,090 Which is a method to correct our message inside, inside our I now we will Google it to know more about 85 00:09:16,090 --> 00:09:18,990 this method as the following. 86 00:09:19,810 --> 00:09:31,150 You can use this webpage, send the grid to know more about starchier less and another incorrect method 87 00:09:31,420 --> 00:09:38,970 to incorrect your message inside your email sending using Python code. 88 00:09:39,100 --> 00:09:39,810 I know. 89 00:09:39,820 --> 00:09:44,450 How does it work or how does it start? 90 00:09:44,640 --> 00:09:51,430 Tell us what to encrypt our message inside our mind and another. 91 00:09:51,430 --> 00:09:54,540 And with the codes as SSL. 92 00:09:55,450 --> 00:10:03,010 OK, and what is the relation between email client and email server and to have the start to a less 93 00:10:03,010 --> 00:10:10,450 incorrect message between them to make it impossible for anyone to read this message. 94 00:10:10,450 --> 00:10:12,310 And we will use two methods. 95 00:10:12,340 --> 00:10:20,110 Method for logging, which is connect underscores the DOT login which take two parameters. 96 00:10:20,410 --> 00:10:29,800 User equals sender, as we specified as a variable in the first beginning of the code and password a 97 00:10:30,220 --> 00:10:31,840 password variable. 98 00:10:32,110 --> 00:10:39,910 And the connect underscores that we don't send them in to send our mail and take three parameters which 99 00:10:39,910 --> 00:10:50,110 are from add or address from underscore address equals sender and to underscore address a d. 100 00:10:50,620 --> 00:10:50,950 E. 101 00:10:50,950 --> 00:10:56,070 S equal recipient and the message between two single codes. 102 00:10:56,350 --> 00:10:57,040 Hi there. 103 00:10:57,310 --> 00:10:59,350 And run our code. 104 00:10:59,800 --> 00:11:10,060 Finally, it is one of the best practices to close the server or the connection after we finish sending 105 00:11:10,060 --> 00:11:10,750 our mail. 106 00:11:14,180 --> 00:11:21,440 So connect on those core server dot, close method, well, close the connection and build our broad 107 00:11:21,440 --> 00:11:24,320 project based on good. 108 00:11:26,220 --> 00:11:31,410 It will give us an error because of to address. 109 00:11:32,250 --> 00:11:43,890 Not contain E, we will remove the E letters from two address to B to underscore a d r. 110 00:11:43,920 --> 00:11:56,370 S and run our project again to run successfully and two point nine seconds and the email will be and 111 00:11:56,610 --> 00:12:04,710 sent for the e mail from Timothy Academy and Gmail dot com. 112 00:12:04,710 --> 00:12:05,400 Hi there. 113 00:12:05,760 --> 00:12:09,330 To Inbox of the Yahoo Mail. 114 00:12:09,330 --> 00:12:10,260 We will refresh. 115 00:12:13,550 --> 00:12:17,300 Refresh again is Ben. 116 00:12:19,280 --> 00:12:20,520 This ends as Ben. 117 00:12:24,860 --> 00:12:33,470 We will remove the old one, then move the new one to the inbox. 118 00:12:35,030 --> 00:12:42,590 Move to the inbox and our mail or email, finally. 119 00:12:43,600 --> 00:12:44,530 It's an. 120 00:12:45,700 --> 00:12:55,460 A box of yellow means hi there from Timothy Take Academy Agema, but there is an issue here, not important, 121 00:12:55,460 --> 00:12:57,380 but we will solve it. 122 00:12:58,010 --> 00:13:00,700 Our Amien has no subject. 123 00:13:00,800 --> 00:13:09,950 We will add the subject of our email, add the following, but we first will stop accounts to send email 124 00:13:09,950 --> 00:13:11,900 from Yahoo to me. 125 00:13:13,010 --> 00:13:19,490 So we will enter the accounts of Gemal Tech and Time our password again. 126 00:13:21,920 --> 00:13:22,790 Our best word. 127 00:13:23,720 --> 00:13:24,260 Again. 128 00:13:26,030 --> 00:13:27,980 Then after we look, logon. 129 00:13:30,020 --> 00:13:34,370 We click on security in our account or account security. 130 00:13:34,480 --> 00:13:43,710 And as I said before, we in the bottom of the page manage passwords, then still delete our old app 131 00:13:43,730 --> 00:13:50,910 and create new one business email list as a business email list. 132 00:13:50,930 --> 00:13:56,060 Generate copy this password done. 133 00:13:57,160 --> 00:14:06,670 Then paste this password in the password variable between the two two single codes, change the sender 134 00:14:06,670 --> 00:14:14,140 to team with take academy at yellow dot com, and the password is the password generated by the app 135 00:14:14,140 --> 00:14:16,090 management in your account. 136 00:14:16,330 --> 00:14:21,040 And the recipient will be Team Tech Academy and Gmail dot com. 137 00:14:21,400 --> 00:14:27,190 And the host will be that man, that yellow dot com. 138 00:14:27,460 --> 00:14:34,330 Then we will add the subject to our main inside the message as the following. 139 00:14:34,670 --> 00:14:38,580 And is that to take care of the addition to the code? 140 00:14:40,870 --> 00:14:48,580 So inside the message equal between the two parenthesis, hi there, we will as subject column discount 141 00:14:48,580 --> 00:14:56,260 offer between without no spaces between the column and discount offers and new line new lines. 142 00:14:56,470 --> 00:14:57,910 Hi there. 143 00:14:58,810 --> 00:15:08,200 Full stop and run our quote again at will run successfully and our men will be sent from Yahoo! 144 00:15:08,560 --> 00:15:10,180 To Gmail. 145 00:15:11,870 --> 00:15:20,630 Successfully with the subject and the message, and we will ensure of that had the fun by jumping into 146 00:15:20,660 --> 00:15:31,010 the two email accounts to ensure all of the email sent using Python code and go to the send email list 147 00:15:31,040 --> 00:15:32,510 and the Yahoo account. 148 00:15:34,670 --> 00:15:42,350 That will show the email sent and the subject at discounts offer and inbox. 149 00:15:43,540 --> 00:15:51,970 We will refresh the inbox of the mail and found our email with the subject discount offer and the message, 150 00:15:51,970 --> 00:15:52,520 Heidi. 151 00:15:53,980 --> 00:16:02,860 We now successfully able to send mail using Python code at this point. 152 00:16:02,890 --> 00:16:05,050 We reached the end of this lecture. 153 00:16:05,290 --> 00:16:08,510 Hope you enjoyed this lecture and to get all of that. 154 00:16:09,010 --> 00:16:11,740 Thanks for being here and thanks for watching. 155 00:16:12,250 --> 00:16:14,620 See you next with you.