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

example not working? #8

Open
abdelouahabb opened this issue Feb 8, 2013 · 6 comments
Open

example not working? #8

abdelouahabb opened this issue Feb 8, 2013 · 6 comments

Comments

@abdelouahabb
Copy link

hello
just run the example and it exits without any results, put the email and no clue!

@puentesarrin
Copy link
Contributor

Hi @abdelouahabb, are you running in a Windows environment? I've had similar problems using Windows...

@abdelouahabb
Copy link
Author

yes, i'm on windows, is this due to TCP stack? because other smtp examples (using python library) worked (by using gmail smtp of course)

@abdelouahabb
Copy link
Author

this is what i used, and it worked:

import smtplib

def send_email(client, link, pin):
to = client
gmail_user = '[email protected]'
gmail_pwd = 'my password'
smtpserver = smtplib.SMTP("smtp.gmail.com",587)
smtpserver.ehlo()
smtpserver.starttls()
smtpserver.ehlo
smtpserver.login(gmail_user, gmail_pwd)
header = 'To:' + to + '\n' + 'From: ' + gmail_user + '\n' + 'Subject:Some thing \n'
msg = header + '\n Message
smtpserver.sendmail(gmail_user, to, msg)
print 'done!'
smtpserver.close()

@puentesarrin
Copy link
Contributor

Yeah, I also had the same error with Windows. We should review the code and fix this.

@abdelouahabb
Copy link
Author

thank you very much 👍

@abdelouahabb
Copy link
Author

any news?

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