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

Requires unsubscribe/opt-out token to send email even though unsubscribe link is already in header #143

Closed
madurak opened this issue Apr 26, 2017 · 5 comments

Comments

@madurak
Copy link

madurak commented Apr 26, 2017

Unsubscribe link is already in the header (of the email in template) but error message says it still requires unsubscribe/opt-out token to send the mail.
screen shot 2017-04-26 at 17 44 56

@petednz
Copy link
Contributor

petednz commented Jun 15, 2017

I think the OP problem is that they haven't inserted {domain.address} token which is also required.

@totten totten added the 2.x label Nov 14, 2017
@totten
Copy link
Collaborator

totten commented Nov 22, 2017

I'm able to reproduce this problem.

This is sort of a Mosaico issue, but IMHO it really goes to the concept behind FlexMailer -- extensions should be able to define new template syntaxes . Mosaico is a basic example of this (because it adds different syntax for the unsub tokens), but other use-cases (like Pug, Markdown, Mustache, or Smarty) could also have their own syntaxes for the unsub tokens. I'm going to work a bit toward making the CAN-SPAM validation tweakable through FlexMailer.

@totten totten added the bug label Nov 22, 2017
@totten
Copy link
Collaborator

totten commented Nov 22, 2017

@totten
Copy link
Collaborator

totten commented Nov 23, 2017

totten added a commit to totten/uk.co.vedaconsulting.mosaico that referenced this issue Nov 25, 2017
Before
------
As observed in veda-consulting-company#143, the default `versafix-1` templates use tokens like
`[unsubscribe_link]` which do not match `{action.unsubscribeUrl}`. Thus,
when you try to submit the mailing, it fails because the token is missing.

After
-----
The `[unsubscribe_link]` is treated as an alias for
`{action.unsubscribeUrl}`. Thus, when you try to submit the mailing,
it accepts that token.

Comment
-------
There's another required token, `{domain.address}`. For the moment,
the patch waives that requirement because Mosaico UX handles that
differently. See comments inlined.
totten added a commit to totten/uk.co.vedaconsulting.mosaico that referenced this issue Nov 28, 2017
Before
------
As observed in veda-consulting-company#143, the default `versafix-1` templates use tokens like
`[unsubscribe_link]` which do not match `{action.unsubscribeUrl}`. Thus,
when you try to submit the mailing, it fails because the token is missing.

After
-----
The `[unsubscribe_link]` is treated as an alias for
`{action.unsubscribeUrl}`. Thus, when you try to submit the mailing,
it accepts that token.

Comment
-------
There's another required token, `{domain.address}`. For the moment,
the patch waives that requirement because Mosaico UX handles that
differently. See comments inlined.
totten added a commit that referenced this issue Nov 28, 2017
Accept Mosaico-style unsubscribe URLs during validation (#143)
@totten totten closed this as completed Nov 30, 2017
@totten
Copy link
Collaborator

totten commented Dec 2, 2017

For posterity: this should be fixed with the combination of CiviCRM 4.7.29+, Mosaico 2.0-beta3+, and FlexMailer 0.2-alpha5+. If you run on an older version of CiviCRM 4.7.x:

  • The new code should degrade gracefully (e.g. no hard crashes, but same buggy behavior).
  • You can easily work-around by editing your content: simply change [unsubscribe_link] to {action.unsubscribeUrl}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants