[EP-tech] Adding a pin to a subject line using User->Mail
John Salter
J.Salter at leeds.ac.uk
Thu Apr 21 13:49:31 BST 2016
Hi Adam,
You can use a phrase with pins - but need to make sure you're using a chunk of text rather than an XML fragment (possibly using the 'phrase' rather than 'html_phrase')
$user->mail(
$session->phrase(
"phrase_with_eprintid_pin_in_it",
eprintid => $eprintid,
),
)
If you want to use other data, that's already rendered you might need to 'flatten' it to use it:
$user->mail(
$session->phrase(
"phrase_with_users_name_pin_in_it",
users_name => EPrints::Utils::tree_to_utf8( $users_name ),
),
),
Cheers,
John
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Vials Moore, Adam
Sent: 21 April 2016 13:26
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Adding a pin to a subject line using User->Mail
Hey all!
I'm trying to send an email notification about an item using the user->mail method
This uses a phrase as the subject HOWEVER I'd really like to set the eprintid and I can't figure out a way to define it, as the method seems only to allow the phrase as part of the call
So - at the moment it looks like:
my $result = $user->mail( "eprint_thesis_notify_mail_subject", $mail );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20160421/6b298bf6/attachment-0001.html
More information about the Eprints-tech
mailing list