Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on sendmail #23

Open
MoahmmedFahd opened this issue Aug 3, 2021 · 2 comments
Open

Error on sendmail #23

MoahmmedFahd opened this issue Aug 3, 2021 · 2 comments

Comments

@MoahmmedFahd
Copy link

Screenshot (83)_LI

Hello Sir ,

i have this issue please could you help me .

this is my code :

mail = smtplib.SMTP('smtp.gmail.com',587) #host and port area

mail.ehlo()  #Hostname to send for this command defaults to the FQDN of the local host.
mail.starttls() #security connection
mail.login('hamzah20215@gmail.com','password') #login part
mail.sendmail('emailID','victimID',msg) #send part
print ("Congrates! Your mail has send. ")
tts = gTTS(text="Congrates! Your mail has send. ", lang='en')
ttsname=("send.mp3") #Example: path -> C:\Users\sayak\Desktop> just change with your desktop directory. Don't use my directory.
tts.save(ttsname)
music = pyglet.media.load(ttsname, streaming = False)

and this is the error :

You are logging from : moham

  1. composed a mail.
  2. Check your inbox
    Your choice:
    ok done!!
    You said : 1
    Your message :
    ok done!!
    You said : hi Mohammed
    Traceback (most recent call last):
    File "C:/Users/moham/OneDrive/Desktop/voice-based-email-for-blind-master/voice_based_email_for_blind.py", line 105, in
    mail.sendmail('emailID','victimID',msg) #send part
    File "C:\Python38\lib\smtplib.py", line 885, in sendmail
    raise SMTPRecipientsRefused(senderrs)
    smtplib.SMTPRecipientsRefused: {'victimID': (553, b'5.1.3 The recipient address is not a valid RFC-5321 address. e16sm14535363pja.14 - gsmtp')}
@the-horseman
Copy link

the-horseman commented Aug 3, 2021 via email

@MoahmmedFahd
Copy link
Author

still i get error says :

Traceback (most recent call last):

File "C:/Users/moham/OneDrive/Desktop/voice-based-email-for-blind-master/voice_based_email_for_blind.py", line 101, in
mail = smtplib.SMTP('smtp.gmail.com',465) #host and port area
File "C:\Python38\lib\smtplib.py", line 253, in init
(code, msg) = self.connect(host, port)
File "C:\Python38\lib\smtplib.py", line 341, in connect
(code, msg) = self.getreply()
File "C:\Python38\lib\smtplib.py", line 398, in getreply
raise SMTPServerDisconnected("Connection unexpectedly closed")
smtplib.SMTPServerDisconnected: Connection unexpectedly closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants