I am new to Python and the code for sending email does not work for me. It gave me a bunch of red error. Does anybody know why? and have the right code for it?
Thank you
you might get helped here
Hi All,
I have written the following python program for sending email. The code is same as was explained in the course video but it is not working as expected and throwing errors. Please see what corrections are required in this script.
###################################################
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib
message = MIMEMultipart()
message[“from”] = “Mosh Hamedani”
message[“to”] = “mohammed.ferozkhan@gamil.…
I am getting this error message when I try and send email with the lesson 14 example. Any ideas why? Im Python 3.7 with Pycharm CE
No module named ‘email.mime’; ‘email’ is not a package.
This is the example in the lesson:
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib
Hi Everyone, anyone can assist me who has similar issue here with setting up the email with the code below where all steps are taken correctly:
Sending email
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib
#import smtp
message = MIMEMultipart()
message[“from”] = “Jason ma”
message[“to”] = “[email protected] ”
message[“subject”] = “This is a test”
message.attach(MIMEText(“Body”))
with smtplib.SMTP(host=“smtp.gmail.com ”, port=587) …