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

feature: html email templates #14

Merged
merged 41 commits into from
Nov 27, 2024
Merged

feature: html email templates #14

merged 41 commits into from
Nov 27, 2024

Conversation

lucasmenendez
Copy link
Contributor

@lucasmenendez lucasmenendez commented Sep 19, 2024

It includes the support to send email notifications using HTML templates. Now there are 3 templates available:

  • Email verification.
  • Password recovery.
  • Admins invites.

And one more that will be included in the future:

  • Welcome (to be sent after account verification).

…to include some internal helpers like email format verification, password hashing or random generation
@lucasmenendez lucasmenendez marked this pull request as ready for review November 20, 2024 12:34
api/helpers.go Outdated Show resolved Hide resolved
api/const.go Outdated Show resolved Hide resolved
api/users.go Outdated Show resolved Hide resolved
api/helpers.go Outdated Show resolved Hide resolved
@emmdim
Copy link
Member

emmdim commented Nov 20, 2024

Testing the verification flow locally (using the default flags) an email arrived to me that looked correct but the link for the verification (both in HTML and plain text ) is this one:
http://url5778.vocdoni.app/ls/click?upn=u001.OhvMA-2F6-2Fw3SL5oZpOtuifAFj04rAGDzgvNaa2a2UTdW8XDYnR7JbPfgnOtPvZPCnSKAt9NJQlV1DZ0XLV0nNyBiQS3jCPEEiNKOr2rY4kDXUK6c-2F6sQEo18AjgGwfuEwoWrQ_Pdp45fVKBUD-2FrUngFeZ82jaXTmd7xv59CoyPA7B58mVUzwTQEPO6x-2BUlNe-2FtyETj79B3ZAL-2Brlg35xoaY0r8nVLjXidYhCG2bHW4eiYVvcPnVw65qmIdBgYXx3QLeLFwdX4BAdUa6yi1o9ulqljpY9eKUE1-2BdtLS3EIjJTAATE7-2Bo-2FjIKb7TBCwO9r8NAk6fAECWanVT-2F2psoI33qyXpCw-3D-3D
What is this?

More importantly did you test the PR?

@lucasmenendez
Copy link
Contributor Author

Testing the verification flow locally (using the default flags) an email arrived to me that looked correct but the link for the verification (both in HTML and plain text ) is this one: http://url5778.vocdoni.app/ls/click?upn=u001.OhvMA-2F6-2Fw3SL5oZpOtuifAFj04rAGDzgvNaa2a2UTdW8XDYnR7JbPfgnOtPvZPCnSKAt9NJQlV1DZ0XLV0nNyBiQS3jCPEEiNKOr2rY4kDXUK6c-2F6sQEo18AjgGwfuEwoWrQ_Pdp45fVKBUD-2FrUngFeZ82jaXTmd7xv59CoyPA7B58mVUzwTQEPO6x-2BUlNe-2FtyETj79B3ZAL-2Brlg35xoaY0r8nVLjXidYhCG2bHW4eiYVvcPnVw65qmIdBgYXx3QLeLFwdX4BAdUa6yi1o9ulqljpY9eKUE1-2BdtLS3EIjJTAATE7-2Bo-2FjIKb7TBCwO9r8NAk6fAECWanVT-2F2psoI33qyXpCw-3D-3D What is this?

More importantly did you test the PR?

Yes, I noticed that, but I think it is something on the Mailchimp side, when you click or paste the link in the address bar, it is redirected to the correct location, including the correct parameters.

@emmdim
Copy link
Member

emmdim commented Nov 21, 2024

Testing the verification flow locally (using the default flags) an email arrived to me that looked correct but the link for the verification (both in HTML and plain text ) is this one: http://url5778.vocdoni.app/ls/click?upn=u001.OhvMA-2F6-2Fw3SL5oZpOtuifAFj04rAGDzgvNaa2a2UTdW8XDYnR7JbPfgnOtPvZPCnSKAt9NJQlV1DZ0XLV0nNyBiQS3jCPEEiNKOr2rY4kDXUK6c-2F6sQEo18AjgGwfuEwoWrQ_Pdp45fVKBUD-2FrUngFeZ82jaXTmd7xv59CoyPA7B58mVUzwTQEPO6x-2BUlNe-2FtyETj79B3ZAL-2Brlg35xoaY0r8nVLjXidYhCG2bHW4eiYVvcPnVw65qmIdBgYXx3QLeLFwdX4BAdUa6yi1o9ulqljpY9eKUE1-2BdtLS3EIjJTAATE7-2Bo-2FjIKb7TBCwO9r8NAk6fAECWanVT-2F2psoI33qyXpCw-3D-3D What is this?
More importantly did you test the PR?

Yes, I noticed that, but I think it is something on the Mailchimp side, when you click or paste the link in the address bar, it is redirected to the correct location, including the correct parameters.

No it doesn't :-P

@lucasmenendez
Copy link
Contributor Author

Testing the verification flow locally (using the default flags) an email arrived to me that looked correct but the link for the verification (both in HTML and plain text ) is this one: http://url5778.vocdoni.app/ls/click?upn=u001.OhvMA-2F6-2Fw3SL5oZpOtuifAFj04rAGDzgvNaa2a2UTdW8XDYnR7JbPfgnOtPvZPCnSKAt9NJQlV1DZ0XLV0nNyBiQS3jCPEEiNKOr2rY4kDXUK6c-2F6sQEo18AjgGwfuEwoWrQ_Pdp45fVKBUD-2FrUngFeZ82jaXTmd7xv59CoyPA7B58mVUzwTQEPO6x-2BUlNe-2FtyETj79B3ZAL-2Brlg35xoaY0r8nVLjXidYhCG2bHW4eiYVvcPnVw65qmIdBgYXx3QLeLFwdX4BAdUa6yi1o9ulqljpY9eKUE1-2BdtLS3EIjJTAATE7-2Bo-2FjIKb7TBCwO9r8NAk6fAECWanVT-2F2psoI33qyXpCw-3D-3D What is this?
More importantly did you test the PR?

Yes, I noticed that, but I think it is something on the Mailchimp side, when you click or paste the link in the address bar, it is redirected to the correct location, including the correct parameters.

No it doesn't :-P

I swear to God it does:

image

@emmdim
Copy link
Member

emmdim commented Nov 21, 2024

Testing the verification flow locally (using the default flags) an email arrived to me that looked correct but the link for the verification (both in HTML and plain text ) is this one: http://url5778.vocdoni.app/ls/click?upn=u001.OhvMA-2F6-2Fw3SL5oZpOtuifAFj04rAGDzgvNaa2a2UTdW8XDYnR7JbPfgnOtPvZPCnSKAt9NJQlV1DZ0XLV0nNyBiQS3jCPEEiNKOr2rY4kDXUK6c-2F6sQEo18AjgGwfuEwoWrQ_Pdp45fVKBUD-2FrUngFeZ82jaXTmd7xv59CoyPA7B58mVUzwTQEPO6x-2BUlNe-2FtyETj79B3ZAL-2Brlg35xoaY0r8nVLjXidYhCG2bHW4eiYVvcPnVw65qmIdBgYXx3QLeLFwdX4BAdUa6yi1o9ulqljpY9eKUE1-2BdtLS3EIjJTAATE7-2Bo-2FjIKb7TBCwO9r8NAk6fAECWanVT-2F2psoI33qyXpCw-3D-3D What is this?
More importantly did you test the PR?

Yes, I noticed that, but I think it is something on the Mailchimp side, when you click or paste the link in the address bar, it is redirected to the correct location, including the correct parameters.

No it doesn't :-P

I swear to God it does:

image

Hm, but I think there is my + missing in the email there...

…otification flag to enable or disable link tracking (using filters in X-SMTPAPI header), issues with query params encoding fixed
@lucasmenendez lucasmenendez marked this pull request as draft November 21, 2024 12:08
@lucasmenendez lucasmenendez marked this pull request as ready for review November 21, 2024 17:22
…e a verification code and link for any kind of database code type, org invite verification code included
@lucasmenendez lucasmenendez merged commit 2ff488e into main Nov 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants