[EP-tech] Notification of embargo release?
Yuri Carrer
yuri.carrer at unipd.it
Tue May 17 09:33:20 BST 2016
Just add code similar to this (this is inside a plugin, you've to change
a little for a cgi):
my $content = $self->{session}->html_phrase(
"mail_body", # this is a xml phrase in the phrases folders. It
acts like a template, with pins inside, replaced with parameters below:
title => $title,
today => $today,
eprintid => $self->{session}->make_text(
$eprintid
) ,
date_embargo => $date_embargo,
creators => $eprint->render_value("creators"),
year => $year,
reason => $self->{session}->make_text(
$self->{session}->param( "reason" ) ),
edit_link => $edit_link );
my @contact_mails;
push @contact_mails, 'amailinglisttoarchivenotifications at me.com';
push @contact_mails, $eprint->get_value("contact_email");
push @contact_mails, @{$eprint->get_value("creators_id")};
my $supervisors = $eprint->get_value("supervisors"); # example
with a custom NameField
foreach my $supervisor (@{$supervisors}) {
push @contact_mails, $supervisor->{email};
}
$self->{session}->get_repository->log(join(',',
@contact_mails)); # log sent mails
foreach my $contact_mail (@contact_mails) {
$self->{session}->get_repository->log($contact_mail); # log every sent mail
my $rc = EPrints::Email::send_mail(
session => $session,
langid => $session->get_langid,
to_email => $contact_mail,
subject => $session->phrase( "mail_tdd_approved_subject" ),
message => $content,
sig => $session->html_phrase( "mail_sig" )
);
}
Il 16/05/2016 18:15, Tomasz Neugebauer ha scritto:
>
> Hi Nick,
>
> Did you get the user email notification of embargo release working?
>
> I’m asking because I may also need to get this working on our repository.
>
> Tomasz
>
> *From:*eprints-tech-bounces at ecs.soton.ac.uk
> [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of *Alan.Stiles
> *Sent:* May-20-15 7:24 AM
> *To:* eprints-tech at ecs.soton.ac.uk
> *Subject:* [EP-tech] Re: Notification of embargo release?
>
> Hi Nick,
>
> The routine that removes the embargo is …./eprints3/bin/lift_embargos
> - usually configured in the crontab to run. It doesn’t have a
> facility to email you built in, but if you set the verbose flag it
> will output a line to say it is removing the embargo from item XXXXXX,
> which crontab may then email to your eprints user on your server – how
> you then get that email though…
>
> Alan
>
> -----Original Message-----
> From: eprints-tech-bounces at ecs.soton.ac.uk
> [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Yuri
> Sent: May-20-15 7:49 AM
> To: eprints-tech at ecs.soton.ac.uk
> Subject: [EP-tech] Re: Notification of embargo release?
>
> Il 20/05/2015 13:02, Sheppard, Nick ha scritto:
>
> >
>
> > Is there a way for eprints to notify me when an embargo expires?
>
> >
>
> just put the lift embargo in the crontab, and alias the user to your
> mail in /etc/aliases
>
> *From:*Sheppard, Nick [mailto:N.E.Sheppard at leedsbeckett.ac.uk]
> *Sent:* 20 May 2015 12:03
> *To:* eprints-tech at ecs.soton.ac.uk <mailto:eprints-tech at ecs.soton.ac.uk>
> *Subject:* [EP-tech] Notification of embargo release?
>
> Is there a way for eprints to notify me when an embargo expires?
>
> Thanks
>
> Nick
>
> -- The Open University is incorporated by Royal Charter (RC 000391),
> an exempt charity in England & Wales and a charity registered in
> Scotland (SC 038302). The Open University is authorised and regulated
> by the Financial Conduct Authority.
>
>
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/
--
Yuri Carrer
CAB - Centro di Ateneo per le Biblioteche, Università di Padova
Tel: 049/827 3615 - Via Anghinoni, 3 - Padova
More information about the Eprints-tech
mailing list