Email invitation sent without link

Hi All,

I have just started learning the great mattermost chat and I LOVE it.
I have a problem with invitations.

I have set the email correctly and I am able to send emails successfully.
But, When I try to invite a member using email - I am getting a confirmation that the email was successfully sent - BUT when I see the email, There is no invitation link inside it.

That is how I thought it should work - sending a link to join the chat room via email.
I am sure that I have a problem with my settings and I don’t know what I should do?

Please assist me so I will be able to send the invitations from the server with the link inside the email itself.

Thank You!

What Mattermost server version are you on?
Can you help share your settings related to Signup https://docs.mattermost.com/administration/config-settings.html#signup?

I am using the dokcer version - latest from https://releases.mattermost.com/5.27.0/mattermost-5.27.0-linux-amd64.tar.gz?src=docker - I have this in my Dockerfile settings and I build my Server using the Settings posted in the github.

FROM alpine:3.12

# Some ENV variables
ENV PATH="/mattermost/bin:${PATH}"
ARG PUID=2000
ARG PGID=2000
ARG edition=team
ARG MM_PACKAGE="https://releases.mattermost.com/5.27.0/mattermost-5.27.0-linux-amd64.tar.gz?src=docker"


# Install some needed packages
RUN apk add --no-cache \
  ca-certificates \
  jq \
  curl \
  libc6-compat \
  libffi-dev \
  linux-headers \
  mailcap \
  netcat-openbsd \
  xmlsec-dev \
  tzdata \
  && rm -rf /tmp/*

# Get Mattermost
RUN mkdir -p /mattermost/data /mattermost/plugins /mattermost/client/plugins \
  && if [ ! -z "$MM_PACKAGE" ]; then curl $MM_PACKAGE | tar -xvz ; \
  else echo "please set the MM_PACKAGE" ; fi \
  && addgroup -g ${PGID} mattermost \
  && adduser -D -u ${PUID} -G mattermost -h /mattermost -D mattermost \
  && chown -R mattermost:mattermost /mattermost /mattermost/plugins /mattermost/client/plugins

The above is the content of my Dockerfile - as I used the same as the one in the github.

Thanks

Would you be able to share what the email looks like, or post the raw text here (with any private details removed)? Also, maybe you could help try to Regenerate the Invite code from Main Menu > Team settings.

Thanks, I have regenerated the invite code as well as sent a new invitation email with no luck at all.
Empty email is sent all the time.

Hope that what I sent helps to understand better.
Thanks

Is the same happening with other types of Mattermost emails (that the email body is empty)? E.g. in a case where a user has email notifications enabled, someone sends him a Direct Message, and the user gets an email notification.

Thanks Amy for helping!
I have sent a test email and it has this:

Looks like it can send an email with a content.
Is there anywhere else to setup team invitations? What could be wrong?

Thanks

Hello, @aryeduino

I believe that that another user has also brought this up to discussion in the following topic:

Would you mind going through the Show original option as suggested by Jesse and either share the content privately to me after sanitizing it (remove any sensitive information) or in this topic itself? Thanks.

I’ve recently discovered that the issue has to do with the HTML body templates for emails not being loaded at all, as I did post in my issue. However still am waiting on further response :slight_smile:

Hi, @XxLilBoPeepsxX

I am putting the error you shared in the other topic for visibility here:

{"level":"error","ts":1602265087.0879729,"caller":"utils/html.go:115","msg":"Error rendering template","template_name":"invite_body","error":"html/template: \"invite_body\" is undefined"}

Based on the research and discussion that I had with the team, it could it be the email template was customized and it got messed up at some point or it was out of date when it was updated in a newer version.

Can you please confirm if you performed any form of customization on the template and whether the issue happened recently prior to an upgrade? If yes, which version were you originally on and to which version did you upgrade to?

Hi! I’ve responded to the original issue I opened, in which I did provide the email invite template, which I have not customized or modified in any form or way at all.

I hope that that information helps, and as I did reference in the issue I opened, I am fully prepared and willing to provide your team access to the system logging for my instance, which has been running on the most verbose level it can be since I first discovered this issue, just let me know.

1 Like

I actually went and was looking at all the email templates, I think they may have been corrupted when I upgraded the mattermost instance to the latest version several weeks ago, there is code cut off from the beginning and end lines of most of the templates, I believe. Would you like me to provide the full folder of templates un-modified from how they appear to me for further analysis?

Hello, @XxLilBoPeepsxX

Yeap, that will be a good idea. Can you please confirm which version you were running on prior to the upgrade to 5.28?

Can you also share the email template files that you were referring to so we can check in the templates directory?

Hi! Sorry for the delay in response, you can view the templates here. The previous version I was running was V.5.12.3 and I am currently on the latest version.

Hi, @XxLilBoPeepsxX

I went through the templates you shared and while it is in Italian (if I am not mistaken), they are completely different from what I see in https://github.com/mattermost/mattermost-server/tree/master/templates

May I know how you deployed Mattermost on your end (any articles / documentation you referred to) and did you upgrade with reference to official guide here?

Well! That certainly is more than a bit confusing to me since I deployed and performed the upgrade specifically from the instructions for ubuntu with MySQL and apache2 from the mattermost website! Not only that, but nobody speaks Italian in our member base, so there is completely no use for the messages to be in Italian. I have used all the official documentation and only the official documentation to do it all!
Would it be of use to invite you to the private GitHub repository that contains the mattermost instance itself, and all it’s files? If so, I’m fully prepared and willing to do so, I would just need a email address to send the invite to.

Ohhhh wait I take that back. I didn’t install it with the installer from the mattermost website, but I did do the upgrade from the mattermost instructions. I’m running my mattermost install on a Ubuntu 18.04 Bionic install on a Raspberry Pi 3B+, which I did the initial install on with the instructions found here

But when i did the server update from the mattermost install instructions, it worked just fine and that was following the official documentation.