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

Calendar invites sent through mail provider have bad alternative text #10415

Open
ChristophWurst opened this issue Nov 27, 2024 · 3 comments
Open

Comments

@ChristophWurst
Copy link
Member

Steps to reproduce

  1. Invite user b as user a
  2. Configure the email client to prefer the text over HTML alternative
  3. Open the invite email as a

Expected behavior

A readable invite, like you get when mail providers are off.

Actual behavior

--=_Gyc75lphDkdfDv2D6wz_xuM
Content-Type: text/plain; charset=utf-8
Content-Description: Plaintext Version of Message
Content-Transfer-Encoding: 8bit

   @media only screen{html{min-height:100%;background:#fff}}@media only
screen and (max-width:610px){table.body
img{width:auto;height:auto}table.body
center{min-width:0!important}table.body
.container{width:95%!important}table.body
.columns{height:auto!important;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;padding-left:30px!important;padding-right:30px!important}th.small-12{display:inline-block!important;width:100%!important}table.menu{width:100%!important}table.menu
td,table.menu
th{width:auto!important;display:inline-block!important}table.menu.vertical
td,table.menu.vertical
th{display:block!important}table.menu[align=center]{width:auto!important}}


   


  GRETA DOçI WOULD LIKE TO INVITE YOU TO "MEETING"


   


  TITLE:MEETING
  WHEN:IN 17 MINUTES ON MITTWOCH, 27. NOVEMBER 2024 BETWEEN 10:00 - 10:30
(EUROPE/BERLIN)


   


  ACCEPT[1]


  DECLINE[2]


  MORE OPTIONS …


   


   

Nextcloud - a safe home for all your dataThis is an automatically sent
email, please do not reply.

                                                 
         


Links:
------
[1] https://redacted
[2] https://redacted

Mail app version

No response

Nextcloud version

No response

Mailserver or service

No response

Operating system

No response

PHP engine version

None

Nextcloud memory caching

No response

Web server

None

Database

None

Additional info

No response

@SebastianKrupinski
Copy link
Contributor

SebastianKrupinski commented Nov 27, 2024

Tested

Confirmed.

Issue

Server is generating both html and plain text messages properly but mail app sending does not support alternate text (html and plain)

Resolution

Alter OCA\Mail\Service\MailTransmission::sendMessage() line 124 to handle alternate text
Alter OCA\Mail\Db\LocalMessage to handle html and plain text separately
Alter OCA\Mail\Provider\Command\MessageSend::perform() to send both html and plain text

@ChristophWurst
Copy link
Member Author

Alter OCA\Mail\Provider\Command\MessageSend::perform() to send both html and plain text

\OCP\Mail\Provider\IMessage has method to set plain and html body so I assume we are able to do all of this without a signature change in the public OCP API? Nice! 👍

@SebastianKrupinski
Copy link
Contributor

\OCP\Mail\Provider\IMessage has method to set plain and html body so I assume we are able to do all of this without a signature change in the public OCP API? Nice! 👍

Yes, no API changes required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📄 To do
Development

No branches or pull requests

2 participants