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

Auto suffix adding on email authentication - why? #54

Open
oernster opened this issue Oct 31, 2016 · 3 comments
Open

Auto suffix adding on email authentication - why? #54

oernster opened this issue Oct 31, 2016 · 3 comments

Comments

@oernster
Copy link

oernster commented Oct 31, 2016

With this code:

import yagmail

def send_email():
"""Send an email"""
yag = yagmail.SMTP(user='user@mycompany.com', password='password',
host='mail.mycompany.com', port=587,
smtp_starttls = False, smtp_skip_login = True) # also tried port 25

attachments = []
yag.send('user@mycompany.com', 'Some text', ['The content of the email'], attachments)

if name == 'main':
send_email()

I see the error:
smtplib.SMTPSenderRefused: (501, b'5.1.7 Invalid address', '@gmail.com')

Why is it adding @gmail.com when I choose to smtp_skip_login? I simply want to avoid all authentication, gmail is not relevant here.

@oernster
Copy link
Author

oernster commented Nov 1, 2016

My apologies, it appears that @nfg has raised the same issue and explained it better to boot.

@kootenpv
Copy link
Owner

kootenpv commented Nov 1, 2016

@oernster Thanks for raising an issue. Are you saying something misses then from the documentation to make it clearer? I could add something if needed. Or you could make a pull request.

@oernster
Copy link
Author

oernster commented Nov 2, 2016

I tried pulling the fix to #53 and my problems went away. I did look into the code and was confused by the very same lines of code that nfg noted but it seems you guys have been discussing and dealing with the issue so I'm happy with the current state of affairs. Thanks for responding. It might be worth documenting use cases for the flags in yagmail.SMTP(...) though.

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