Skip to content

Commit

Permalink
fixup! ✨(mailbox) send new mailbox confirmation email
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeammet committed Sep 23, 2024
1 parent aa431c5 commit a28f5c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/backend/mailbox_manager/utils/dimail.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ def send_mailbox_request(self, mailbox, user_sub=None):
"Permission denied. Please check your MAIL_PROVISIONING_API_CREDENTIALS."
)

self.pass_dimail_unexpected_response(response)
return response
return self.pass_dimail_unexpected_response(response)

def pass_dimail_unexpected_response(self, response):
"""Raise error when encountering an unexpected error in dimail."""
Expand Down
3 changes: 0 additions & 3 deletions src/backend/people/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,7 @@ class Base(Configuration):
# Mail
EMAIL_BACKEND = values.Value("django.core.mail.backends.smtp.EmailBackend")
EMAIL_HOST = values.Value(None)
EMAIL_HOST_USER = values.Value(None)
EMAIL_HOST_PASSWORD = values.Value(None)
EMAIL_PORT = values.PositiveIntegerValue(None)
EMAIL_USE_TLS = values.BooleanValue(False)
EMAIL_USE_SSL = values.BooleanValue(False)
EMAIL_FROM = values.Value("[email protected]")

Expand Down
10 changes: 6 additions & 4 deletions src/mail/mjml/new_mailbox.mjml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@
<mj-section mj-class="bg--white-100" padding="30px 20px 60px 20px">
<mj-column>
<mj-text font-size="14px">
<p>{% trans "Your new mailbox information" %}</p>
<p>{{title}}</p>
</mj-text>

<!-- Welcome Message -->
<mj-text>
<h1>{% trans "Your new email is ready !" %}</h1>
<h1>{% trans "Your new mailbox is ready !" %}</h1>
</mj-text>
<mj-divider border-width="1px" border-style="solid" border-color="#DDDDDD" width="30%" align="left"/>

<mj-image src="{% base64_static 'images/logo.png' %}" width="157px" align="left" alt="{%trans 'Logo' %}" />

<!-- Main Message -->
<mj-text>{% trans "Here are your credentials : {{mailbox_data['email']}} // {{mailbox_data['password']}}" %}</mj-text>
<mj-text>{% trans "You can access your mail through {{webmail_url}}" %}</mj-text>
<mj-text>{% trans "Here are your credentials ! " %}</mj-text>
<mj-text>{% trans "Email address : "%}{{mailbox_data.email}}</mj-text>
<mj-text>{% trans "Temporary password : "%}{{mailbox_data.password}}</mj-text>
<mj-text>{% trans "You can access your mails on " %}<a href="//{{webmail_url}}"</a>.</mj-text>

<mj-button href="//{{site.domain}}" background-color="#000091" color="white" padding-bottom="30px">
{% trans "Visit Régie"%}
Expand Down

0 comments on commit a28f5c7

Please sign in to comment.