Skip to content

Commit 00c4004

Browse files
JACK-NEW-PROJECTvybhav72954
authored andcommitted
Update by JaxBCD
add getpass module for password input
1 parent 42e7c2a commit 00c4004

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Python/Send_Emails/send_emails.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/python
22

33
import smtplib
4+
import getpass
45

56
# The smtp module (Simple Mail Transfer Protocol) enables sending emails in python
67
# The sender's email must be configured to less secure apps.
@@ -14,8 +15,8 @@
1415
receiver = input("Enter the receiver's Email-ID : ")
1516

1617
# "Sender's password"
17-
password = input("Enter the sender's password : ")
18-
18+
password = getpass.getpass(prompt='Enter the sender's password : ')
19+
1920
# "Subject of the Email"
2021
subject = input("Enter the subject of the email : ")
2122

0 commit comments

Comments
 (0)