Looks like for mass mailings, the token for the unsub link is being created in the DADA::Mail::Send module, in the maketoken() method You'll then see it being called in the, mailmerge() method:
# type is passed in, $self->list_type
my $confirmation_token = $self->_make_token(
{
-list => $labeled_data{'list_settings
list'},
-email => $subscriber_vars->{'subscriber
email'},
-msg_id => $labeled_data{message_id},
}
);
$labeled_data{'list
confirmation_token'} = $confirmation_token; # list invites? Messed up
$labeled_data{'list_unsubscribe_link'} = $DADA::Config::PROGRAM_URL
'/t/'
$labeled_data{'list
confirmation_token'}
'/';
On May 7, 2014, at 5:38 PM, Megan Mangler p p Dada Mail Developers (meganmangler at yahoo com) justin@dadamailproject com wrote:
Hi - I have a question that I think fits under "Help customizing Dada Mail for your own internal needs" Please let me know if I'm posting this to the wrong place
I'd like to use Dada Mail for the Drafts/Archives/Stats/etc capabilities, but we're a fairly large website and have our own subscription management system (for other site features) and would like our users to be able to use that same page to subscribe/unsubscribe for a newsletter concept we're developing
I've been reviewing the DADA::MailingList::Subscribers API, and I think I'll be able to use that to coordinate changes between the two systems However, I still have one sticking point We have our own custom unsubscribe program, and our own unsubscribe links I can't figure out any way to send out our custom unsubscribe links on each email We generate the unsub links specifically for each user/mailing, so the url is something like http://www site com/unsub/[long-encrypted-string] The user only needs to click a button on the page that says "Yes, unsubscribe me" for it to work
So, one idea WOULD be to subclass this method, but unfortunately, I'm not making it super easy for you to do that Still, perhaps sticking your own method in the mailmerge method is the quick and easy thing to do, for now:
require INTERNAL::THING;
$labeled_data{'_internal_unsub_link'} = INTERNAL::THING::internal_unsub_link($subscriber_vars->{'subscriber
email'});
my $entity = $args->{-fm_obj}->email_template(
# …
);
Then, you could use,
<!— tmpl_var _internal_unsub_link —>
in your message
That would cover you for all mass mailings I kinda wish you could just use the template engine, which supports functions-kinda I don't know if there's any way to pass dynamic variables to these functions, though If there was, you could just do this in your own templates:
Click here to unsubscribe!
<!— tmpl_if expr="_internal_unsub_link(<!— tmpl_var subscriber
email —>)" -->
http://search
cpan
org/~samtregar/HTML-Template-Expr/Expr
pm#DEFINING_NEW_FUNCTIONS
If there's any other ideas you may have, I'm willing to make the code easier to work with, to get your project working with tinier speed bumps
Start a new thread, email: dadadev@dadamailproject.com
This is the developer discussion mailing list for Dada Mail.
If you are just looking for support Dada Mail, consult the message boards at:
https://forum.dadamailproject.com
Documentation for Dada Mail:
Specifically, see the Error FAQ:
https://dadamailproject.com/d/FAQ-errors.pod.html
To post to this list, send a message to:
mailto:dadadev@dadamailproject.com
All subscribers of this list may post to the list itself.
Topics that are welcome:
Dada Mail is on Github:
https://github.com/justingit/dada-mail/
If you would like to fork, branch, send over PRs, open up issues, etc.
This Privacy Policy is for this mailing list, and this mailing list only.
Email addresses collection through this mailing list are used explicitly to work within this email discussion list.
We only collect email addresses through our Closed-Loop Opt-In system.
We don't use your email address for any other purpose.
We won't be sharing your email address with any other entity.
Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.
All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.
All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.