abp icon indicating copy to clipboard operation
abp copied to clipboard

Send Base64 Images in Email with Google Apps

Open masoodkhoshgard opened this issue 1 year ago • 3 comments

Description

#19930

Gmail will not render base64 images embedded inside HTML emails but with Google Apps Script on Gmail: Screenshot 2024-05-26 125259

on personal mail server: Screenshot 2024-05-26 125348

Checklist

  • [X] I fully tested it as developer / designer and created unit / integration tests

masoodkhoshgard avatar May 26 '24 09:05 masoodkhoshgard

Codecov Report

Attention: Patch coverage is 5.47945% with 69 lines in your changes missing coverage. Please review.

Project coverage is 52.09%. Comparing base (5857f65) to head (58331fc). Report is 158 commits behind head on dev.

:exclamation: Current head 58331fc differs from pull request most recent head 089cc52

Please upload reports for the commit 089cc52 to get more accurate results.

Files Patch % Lines
....Abp.Emailing/Volo/Abp/Emailing/EmailSenderBase.cs 5.47% 69 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #19932   +/-   ##
=======================================
  Coverage   52.09%   52.09%           
=======================================
  Files        3107     3105    -2     
  Lines       99366    99310   -56     
  Branches     7514     7515    +1     
=======================================
- Hits        51763    51738   -25     
+ Misses      46044    46016   -28     
+ Partials     1559     1556    -3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 26 '24 10:05 codecov[bot]

Thank you for your code.

The NormalizeMailAsync is designed to override and meet your cases.

We don't need to add the Gmail-relevant code to the framework.

maliming avatar May 27 '24 01:05 maliming

Thank you for your code.

The NormalizeMailAsync is designed to override and meet your cases.

We don't need to add the Gmail-relevant code to the framework.

Thanks @maliming But keep in mind that Gmail is a public service and this problem happens a lot and that it is likely to occur for other mail services as well.

masoodkhoshgard avatar May 28 '24 20:05 masoodkhoshgard

I have formatted the code. The code differences are now simpler.

@ebicoglu You can review it again. Thanks.

maliming avatar Jul 04 '24 05:07 maliming

hi @masoodkhoshgard

We have decided not to add the NormalizeMailForBase64DataAsync to the framework. You can use it in your project.

Thanks for your contribution.

maliming avatar Jul 29 '24 07:07 maliming