Use username as sender name for email notifications under Office 365


#1

Hello,

we have an on-premise setup that uses Office 365 as the email provider for sending notification emails. Notification emails have been sent out as " gitlab@ourcompany.com". Since a few weeks all notifications mails are received as “Gitlab gitlab@ourcompany.com”, where “Gitlab” is the name of the email account, configured in Office 365 with which we are sending the mails. We have made a quite a bit of research and have come to the conclusion that nothing has changed in Outlook 365 so we suspect one of the recent gitlab updates to be the culprit.

Here is our config:

 gitlab_rails['gitlab_email_enabled'] = true
 gitlab_rails['gitlab_email_from'] = '[obscured]'
# gitlab_rails['gitlab_email_display_name'] = 'Gitlab'
#gitlab_rails['smtp_address'] = "[obscured]"
gitlab_rails['smtp_address'] = "smtp.office365.com"
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_port'] = 587
#gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "[obscured]"
gitlab_rails['smtp_password'] = "[obscured]"
gitlab_rails['smtp_domain'] = "[obscured]"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false
gitlab_rails['smtp_openssl_verify_mode'] = 'peer' # Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert', see http://api.rubyonrails.org/classes/ActionMailer/Base.html
#gitlab_rails['smtp_ca_path'] = "/etc/ssl/certs"
#gitlab_rails['smtp_ca_file'] = "/etc/ssl/certs/ca-certificates.crt"

We have switched on the “Include author name in email body” option, in order to be able to see the author at least after opening the email.

Does anybody has a clue what could be the cause for this and how to get it fixed?

Thank you in advance,
Matti


#2

Does anyone have a clue for us?


#3

Hi Matti,

I’m not sure what you are trying to do: do I understand it correctly that you are just trying to remove the display name from the sender e-mail account?

Expected:
<gitlab@ourcompany.com>

Actual:
“Gitlab <gitlab@ourcompany.com>

I’m not sure if it’ll work, but have you tried setting the display name as empty?

gitlab_rails['gitlab_email_display_name'] = ''

#4

Hi dplanella,

No, I want the author of a comment to be displayed again. That’s how it has been working until a few weeks ago.

Expected:
Matti <gitlab@ourcompany.com>” or “John <gitlab@ourcompany.com>” or “Jim <gitlab@ourcompany.com>

Actual:
Gitlab <gitlab@ourcompany.com>


#5

Is there anyone who can help with this? Or has a clue?