Active
Project:
Simplenews
Version:
6.x-2.x-dev
Component:
Usability
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2010 at 19:05 UTC
Updated:
17 Jan 2013 at 09:09 UTC
I have the latest version installed and am trying to set-up the sending of a tokenized email when someone either subscribes or unsubscribes to a newsletter.
The email is being sent, but the token fields are coming through unpopulated - eg [simplenews-receiver-mail] is showing up as [simplenews-receiver-mail] in the email.
Global tokens appear ok in the email.
Am I trying to use the tokens for a use they weren't intended for?
Comments
Comment #1
sutharsan commentedThe tokens are supported only in the simplenews (un)subscribe confirmation emails. Not in other emails e.g. Sent by Actions or Rules. Are all simplenews tokens not replaced?
Comment #2
linksync commentedoh, ok Sutharsan. Tokens are working fine in the simplenews (un)subscribe confirmation emails. I was trying to use them in actions.
A few of my client want an email sent to them any time a user (un)subscribes to their sites newsletters (including the email address of the (un)subscriber) and I was hoping I could do that with actions and tokens.
Could I modify the function to bcc a message to her when a user (un)subscribes? If so, what function should I be looking at, or is there another way I can achieve this?
Thanks.
Comment #3
sutharsan commentedA small module with a hook_mail_alter implementation will do just that.
Comment #4
tajabosc commentedHello,
i followed your advice to use a hook_mail_alter approach.
In this way i get almost all simplenews tokens working in mails sent with "actions", but i can't get [simplenews-receiver-mail] token for anonymous users.
I checked
$account->mail, and is in fact emptyI wonder if i can get the equivalent of
%userprompted indrupal_set_messagein the mails sent trough actions...Is there any way to get the email address of the anonymous newsletter receiver?
Regards
Daniele
Comment #5
imadrupal commentedWhere do i put this code ?