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

Missing header with logo in emails #431

Open
liaham opened this issue Jul 8, 2023 · 2 comments
Open

Missing header with logo in emails #431

liaham opened this issue Jul 8, 2023 · 2 comments

Comments

@liaham
Copy link

liaham commented Jul 8, 2023

What I have expected:

I expect to get emails with a header containing the logo image as implemented in lib/Email/EMailTemplateNC20.php :

protected $header = <<<EOF
<table align="center" class="wrapper header float-center" style="Margin:0 auto;background:#8a8a8a;background-color:%s;border-collapse:collapse;border-spacing:0;float:none;margin:0 auto;padding:0;text-align:center;vertical-align:top;width:100%%">
<tr style="padding:0;text-align:left;vertical-align:top">
<td class="wrapper-inner" style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;border-collapse:collapse!important;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:20px;text-align:left;vertical-align:top;word-wrap:break-word">
<table align="center" class="container" style="Margin:0 auto;background:0 0;border-collapse:collapse;border-spacing:0;margin:0 auto;padding:0;text-align:inherit;vertical-align:top;width:580px">
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<td style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;border-collapse:collapse!important;color:#0a0a0a;font-family:Lucida Grande,Geneva,Verdana,sans-serif;font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;text-align:left;vertical-align:top;word-wrap:break-word">
<table class="row collapse" style="border-collapse:collapse;border-spacing:0;display:table;padding:0;position:relative;text-align:left;vertical-align:top;width:100%%">
<tbody>
<tr style="padding:0;text-align:left;vertical-align:top">
<center data-parsed="" style="min-width:580px;width:100%%">
<img class="logo float-center" src="%s" alt="%s" align="center" style="-ms-interpolation-mode:bicubic;Margin:0 auto;clear:both;display:block;float:none;margin:0 auto;outline:0;text-align:center;text-decoration:none" height="50">
</center>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>

What I have observed instead:

When sending an email with a scheduled appointment which is awaiting the users confirmation there is no logo:

image

When I look into the emails source code there is no header at all.

How to solve the problem:

Overriding the email template via mail_template_class does not change anything. In contrast extending the nextcloud mail template works.

Probably the reason is outside of the lib/Email/EMailTemplateNC20.php file. Investigating this is beyond my capabilities.

Technical details:

Tested with

  • nextcloud 26.0.2 and 28
  • appointments 1.15.2
@svtcpx
Copy link

svtcpx commented Aug 27, 2023

Where are you receiving this email? If it's a client, check to see how HTML is rendered. I've had odd email issues until I discovered that I had "Basic HTML" enabled so it was perfectly expected behaviour :)

@liaham
Copy link
Author

liaham commented Aug 27, 2023

This is a good point! Meanwhile I have coded an overwritten email template that solved my problem.

Therefore, I cannot reproduce the problem to check if the configuration of my email client could be the reason. If so, then I would expect other nextcloud emails to behave the same way. And this was not the case.

Thank you for your contribution anyway! :)

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