added optimised OS codes
This commit is contained in:
parent
c318712180
commit
0fc0033265
4 changed files with 142 additions and 0 deletions
14
CNP/Wireshark/SMTP/mail-sender.py
Normal file
14
CNP/Wireshark/SMTP/mail-sender.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
import smtplib
|
||||
from email.message import EmailMessage
|
||||
|
||||
# the email message
|
||||
msg = EmailMessage()
|
||||
msg['Subject'] = 'CNP Assignment Email'
|
||||
msg['From'] = 'aadit@example.com'
|
||||
msg['To'] = 'shreyas@example.com' # used example.com just to not have a DNS error.
|
||||
msg.set_content('Hello World. This is a message that is to be captured for the CNP FISAC II.')
|
||||
|
||||
#SMTP server running on localhost on port 25
|
||||
with smtplib.SMTP('127.0.0.1', 25) as server:
|
||||
server.set_debuglevel(1) # debug output to see the SMTP conversation (for dev log)
|
||||
server.send_message(msg)
|
Loading…
Add table
Add a link
Reference in a new issue