I am using the Mail Editor module 7.x-1.0 together with Subscriptions 7.x-1.1, only to send simple notification emails to subscribers of forums. Subscribers should be notified when a post has been created, updated or commented.

To keep things as easy as possible, I am only using Subscriptions Mail's .DEFAULT template (at admin/config/system/mail-edit/subscriptions_mail_.DEFAULT/en). I am NOT using anything inside the "Comment" textarea - only the "Subject" and "Body" fields are filled. Here is the content of the "Body" field:

{{MAIL@ Dear [current-user:name],

the post
"[node:title]"
has been {{[subs:is-new]#created
}}{{[subs:is-updated]#updated
}}{{![subs:is-old]?by [node:author:name]:commented by [comment:author:name]}}
on [current-date:medium] at
[node:url]
}}

This works fine - i.e. the notification mails correctly differ if a post has been created, updated or commented, but the [comment:author:name] token always resolves to an empty string! So subscribers will only know the name of users that created or edited a post, but I can't find a way to let them know who commented on posts. That's just a very basic feature a notification system should be expected to provide. Is this really not possible with the Subscriptions & Mail Editor module combo?

Comments

salvis’s picture

Project: Mail Editor » Subscriptions
Category: Bug report » Support request
Priority: Major » Normal
Status: Active » Fixed

The [comment:author:name] (like all [comment:...] tokens) is only available in the comment field.

This becomes obvious if you consider that you may have more than one new comment.

roball’s picture

Thank you for clarifying. So I solved my problem by using

{{MAIL@ Dear [current-user:name],

the post
"[node:title]"
has been {{[subs:is-new]#created
}}{{[subs:is-updated]#updated
}}{{![subs:is-old]?by [node:author:name]:commented by [subs:comments:join:]}}
on [current-date:medium] at
[node:url]

You are receiving this notification because you have active subscriptions
on the site "[site:name]".
To manage your subscriptions go to
[subs:manage-url]
}}

in the Body field and

[comment:author:name]

in the Comment field.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

roball’s picture

Title: The [comment:author:name] token is never be resolved » The [comment:author:name] token is never been resolved in the Body field