Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove logo from email header

Henriette Dargebdee92ae2efd
diff --git a/app/helpers/mail_notification_helper.rb b/app/helpers/mail_notification_helper.rb
index 65b9fb5bc06..6c520db8aa7 100644
--- a/app/helpers/mail_notification_helper.rb
+++ b/app/helpers/mail_notification_helper.rb
@@ -29,28 +29,6 @@
module MailNotificationHelper
include ::ColorsHelper
- def logo_tag(**options)
- current_logo = CustomStyle.current.logo unless CustomStyle.current.nil?
-
- if current_logo.present?
- logo_file = current_logo.local_file
- logo = File.read(logo_file)
- content_type = MIME::Types.type_for(logo_file.path).first.content_type
- else
- logo = File.read(Rails.root.join('app/assets/images/logo_openproject_narrow.svg'))
- content_type = "image/svg+xml"
- end
-
- email_image_tag(logo, content_type, **options)
- end
-
- def email_image_tag(image, content_type, **options)
- image_string = image.to_s
- base64_string = Base64.strict_encode64(image_string)
-
- image_tag "data:#{content_type};base64,#{base64_string}", **options
- end
-
def unique_reasons_of_notifications(notifications)
notifications
.map(&:reason)
diff --git a/app/views/mailer/_notification_mailer_header.html.erb b/app/views/mailer/_notification_mailer_header.html.erb
index 93a58f5357a..cbfeb7ac733 100644
--- a/app/views/mailer/_notification_mailer_header.html.erb
+++ b/app/views/mailer/_notification_mailer_header.html.erb
@@ -48,15 +48,6 @@
</table>
</td>
<%= placeholder_cell('16px', vertical: true) %>
- <td style="vertical-align: top;">
- <table <%= placeholder_table_styles %>>
- <tr>
- <td style="width: 96px; height: 96px; max-width: 96px;">
- <%= logo_tag(alt: "#{Setting.app_title} #{I18n.t(:'mail.logo_alt_text')}", style: "width: 96px;max-width: 96px;max-height: 96px;") %>
- </td>
- </tr>
- </table>
- </td>
</tr>
</table>
</td>