As you can see below i have a script that uses smtp module to send mail back to the usr_mail
, the function mail_man
takes an argument message
and sends via mail , through out my testing i passed some simple messages to the script but i does not seem to send the messages passed instead it shows this message has no body text
some messages examples :
"hello world !!! :) "
"you got mail from : " + str(usr_mail)
" @ somthing "
how can i send a paragraph like message with symbols numbers letters using smtp
module
import smtp
def mail_man(message):
handle = smtplib.SMTP('smtp.gmail.com', 587)
handle.starttls()
handle.login(usr_mail , pass_wrd)
handle.sendmail(usr_mail , usr_mail , message)
handle.quit()
print ( " Successfully sent email to :: " + usr_mail)
return
if __name__ == "__main__":
print (usr_mail , pass_wrd )
mail_man(message="hello world !!! :) ")