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

Feature Request: Add option to add {googleurl_img} as an email attachement #1226

Closed
speedy01 opened this issue Sep 6, 2018 · 6 comments
Closed
Assignees
Labels
Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature.

Comments

@speedy01
Copy link

speedy01 commented Sep 6, 2018

Outlook does not support inline images encoded in base64. This is the current method used for QR code in email {googleurl_img} and usernotifcation. Please consider adding the option to include the QR image as an attachment. Another option may be to use the CID or link to the img (if linking, then img/link should expire)

quick link that goes over CID tags
https://sendgrid.com/blog/embedding-images-emails-facts/

@cornelinux cornelinux added the Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature. label Sep 7, 2018
@cornelinux
Copy link
Member

We would have to add another parameter like attachments (being a list) to this function
https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/smtpserver.py#L130

We would need an email config in the notification handler, to define if images should be sent inline or as attachment. https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/eventhandler/usernotification.py#L113

Here (https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/eventhandler/usernotification.py#L281) we would need to read this config and call send_email_identifier (https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/eventhandler/usernotification.py#L334) accordingly.

@cornelinux cornelinux added this to the 3.1 New Feature Release milestone Nov 30, 2018
@cornelinux
Copy link
Member

Here is the explanation how this can be done for outlook.
https://community.privacyidea.org/t/qr-code-via-sms-or-email/793/9

@cornelinux cornelinux removed this from the 3.1 New Feature Release milestone May 16, 2019
@plettich
Copy link
Member

It seems, google does not allow inline data URLs in gmail: https://stackoverflow.com/a/42014708/7036742
Adding the QR-Code as an attachment solves this.

@plettich plettich reopened this Jan 28, 2020
@plettich plettich self-assigned this Jan 28, 2020
@cornelinux
Copy link
Member

I am looking forward to your pull request ;-)

plettich added a commit that referenced this issue Jan 30, 2020
Some email programs and providers have problems with inline images or
data-URLs so this will be fixed with this commit.
The UserNotificationHandler gets an additional option 'attachment' which
triggers the creation of a multipart email (text and image) and pass it to
the smtp-server.

Working on #1226

TODO: Documentation
plettich added a commit that referenced this issue Feb 6, 2020
Using attachments was enforcing an HTML body, this is now fixed.

Working on #1226
plettich added a commit that referenced this issue Feb 6, 2020
Also updated some of the usernotification documentation.

Working on #1967
Working on #1226
@plettich
Copy link
Member

Documentation is done, so i'll close this.

maxbeth pushed a commit to maxbeth/privacyidea that referenced this issue Mar 5, 2021
Some email programs and providers have problems with inline images or
data-URLs so this will be fixed with this commit.
The UserNotificationHandler gets an additional option 'attachment' which
triggers the creation of a multipart email (text and image) and pass it to
the smtp-server.

Working on privacyidea#1226

TODO: Documentation
maxbeth pushed a commit to maxbeth/privacyidea that referenced this issue Mar 5, 2021
Using attachments was enforcing an HTML body, this is now fixed.

Working on privacyidea#1226
maxbeth pushed a commit to maxbeth/privacyidea that referenced this issue Mar 5, 2021
Also updated some of the usernotification documentation.

Working on privacyidea#1967
Working on privacyidea#1226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature.
Projects
None yet
Development

No branches or pull requests

3 participants