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

user / useralias for non gmail address #22

Closed
mtowara opened this issue Oct 8, 2015 · 4 comments
Closed

user / useralias for non gmail address #22

mtowara opened this issue Oct 8, 2015 · 4 comments

Comments

@mtowara
Copy link

mtowara commented Oct 8, 2015

when specifiying an username without an "@" gmail.com is always appended as a suffix. This prevents from authenticating with my smtp server.

Also is it inteded behaviour that user and useralias are always the same thing?

I would propse to have an option that disables this autocompletion.
If you agree I could prepare a pull request if you like.

@mtowara
Copy link
Author

mtowara commented Oct 8, 2015

Nevermind, I figured out how to do it with the dict method (yagmail.SMTP(user={"myuser":"myuser@mydomain.example"})

However I now see the same behaviour as in #18 , that is "From:" shows as "user@" without the alias behind it.
I was able to fix in postfix, the headers created by yagmail looked ok.

@kootenpv
Copy link
Owner

kootenpv commented Oct 8, 2015

The idea was that yagmail originally intended gmail. I was under the impression that anyone using SMTP would use it with a "@" for logging into it.

This is why I figured that if someone is not giving a @, they probably intended to login in with just a username (skipping @gmail.com, as is possible at gmail itself).

The alias is used to differentiatie between login info and what is shown in the FROM header.

Do you think you would be able to login when I wouldn't automatically add the @gmail.com?

You could possibly also test it for yourself by reimplementing temporarily:

https://github.com/kootenpv/yagmail/blob/master/yagmail/yagmail.py

Removing line 305 and 306.

@mtowara
Copy link
Author

mtowara commented Oct 9, 2015

Hi there,
as said for authentificating with my smtp server i need the username to be without an "@".
However as this is possible using the dict method you don't need to change anything if you don't want to.

Just FYI I'm trying to get the OctoPrint Email Notifyer Plugin to work, which uses your library.

Feel free to close the issue, thanks.

@kootenpv
Copy link
Owner

Hey,

Thanks, it is very nice to see it is depended on :), thanks for notifying.

I'll leave it open for now, since you did find a workaround. Upon more requests I'll be sure to patch it.

Best,
Pascal

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