EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #07124
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Ask about frequency of items-under-review mailings:
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Thu, 1 Feb 2018 09:12:11 +0000
Hi, Alan is right (but I think he meant $user->get_value( 'email' ) if… ). Which version of EPrints are you using? If you look in EPRINTS_HOME/perl_lib/EPrints/Email.pm, do you have any references to 'to_list' or 'cc_list'? In newer versions, the following lines handle multiple 'To' recipients, or a Cc list: https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Email.pm#L187-L196 https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Email.pm#L272-L279 If you are using a version that has that in, you can add something like this: my $staff_emails = qw( bob@domain.com jim@domain.com chris@domain.com ); my $cc_emails = qw( me@domain.com you@domain.com ); … my $userMailOK = EPrints::Email::send_mail( session => $session, langid => $session->get_langid, to_email => 'main_email@domain.com', to_list => $staff_emails, cc_list => $cc_emails, subject => $session->phrase( "status_change_inbox_to_review_subject" ), message => $mail, sig => $session->html_phrase( "mail_sig" ) ); To make a more future-proof system, you could build the to_list or cc_list dynamically using the steps I outlined below (get
all editors / see if the item is 'in scope' of that editor), but that depends on how many people edit your items! Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Alan.Stiles Hi – you are trying to get_value(“email”) from a true/false value, rather than the config or the user record? Try changing the line to
My $staff_email = $staff->get_value( “email”) if( $user->is_staff() );
I think (not checked) for multiple addresses you would need to build them into an array in the to_email => value
Alan From:
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Ajunk Pracetio Hi , I already try your suggestion, and it works. But, when I try to use to_list and to_cc (https://wiki.eprints.org/w/API:EPrints/Email), I get error. If
to_email => blabla@comain.com and I want cc to other email address let say 5 people, what function I must use? When I try thy this method below, I get error
Error from var/log : Can't call method "get_value" without a package or object reference at (eval 663) line 20.\n On Wed, Jan 31, 2018 at 6:01 PM, John Salter <J.Salter@leeds.ac.uk> wrote:
Life isn't valuable if you don't have someone to care -- 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
in relation to its secondary activity of credit broking. |
- Follow-Ups:
- Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Ask about frequency of items-under-review mailings:
- References:
- [EP-tech] Ask about frequency of items-under-review mailings:
- From: Ajunk Pracetio <prazetyo@gmail.com>
- Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: Ajunk Pracetio <prazetyo@gmail.com>
- Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: Ajunk Pracetio <prazetyo@gmail.com>
- Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Ask about frequency of items-under-review mailings:
- Prev by Date: Re: [EP-tech] Ask about frequency of items-under-review mailings:
- Next by Date: [EP-tech] How to let Eprints support Chinese searching?
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):