EPrints Technical Mailing List Archive
Message: #07119
< 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>
- Subject: Re: [EP-tech] Ask about frequency of items-under-review mailings:
- From: Ajunk Pracetio <prazetyo@gmail.com>
- Date: Wed, 31 Jan 2018 16:13:06 +0700
my( %o ) = @_;
my $eprint = $o{dataobj};
my $old_status = $o{old_status};
my $new_status = $o{new_status};
my $session = $eprint->get_session;
my $user = $eprint->get_user(); #user that only editor/administrator only
my $user_email = $user->get_value( "email" ); #when you are testing, set this to your email - so you don't spam people!
# EXAMPLE of a deposit receipt
if( $old_status eq "inbox" && $new_status eq "buffer" ){
# send a deposit receipt?
# Do something similar to the stuff below - but with different phrases!
my $title = $eprint->render_value( "title" );
my $users_name = $user->render_value( "name" );
my $mail = $session->make_element( "mail" );
$mail->appendChild( $session->html_phrase( "status_change_inbox_to_review_body",
users_name => $users_name,
title => $title
) );
my $userMailOK = EPrints::Email::send_mail(
session => $session,
langid => $session->get_langid,
to_email => #EDITOR OR ADMINISTRATOR EMAIL?,
subject => $session->phrase( "status_change_inbox_to_review_subject" ),
message => $mail,
sig => $session->html_phrase( "mail_sig" )
);
}
# NOTIFICATION FOR LIVE ARCHIVE
if( $old_status eq "buffer" && $new_status eq "archive" ){
# you might want to check what the datestamp is - and not send an email if this item has
# been moved from archive -> buffer -> archive for some reason.
my $title = $eprint->render_value( "title" );
my $users_name = $user->render_value( "name" );
my $url = "" $eprint->get_url );
$url->appendChild( $session->make_text( $eprint->get_url ) );
my $mail = $session->make_element( "mail" );
$mail->appendChild( $session->html_phrase( "status_change_buffer_to_archive_user_body",
users_name => $users_name,
title => $title,
eprint_url => $url
) );
my $userMailOK = EPrints::Email::send_mail(
session => $session,
langid => $session->get_langid,
to_email => $user_email,
subject => $session->phrase( "status_change_buffer_to_archive_user_subject" ),
message => $mail,
sig => $session->html_phrase( "mail_sig" )
);
# you could check the value of $userMailOK - in case the email wasn't sent
} # END of buffer-to-archive
});
Hi Agung,
Yes - there is a way to do this.
I wrote this page a while ago to explain how - let me know if there are parts that you don't understand!
https://wiki.eprints.org/w/
Sending_email_when_item_is_ made_live_or_deposited
Cheers,
John
From: eprints-tech-bounces@ecs.
soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk ] On Behalf Of Ajunk Pracetio
Sent: 28 January 2018 06:52
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Ask about frequency of items-under-review mailings:
Hi,
Is it possible to send email frequencies directly to the editor whenever a depositor uploads an item? Because the setting is only once per day.
If you have to make modifications, which files should I edit?
thank you.
Greetings,
Agung P.W
--Life isn't valuable if you don't have someone to care
*** 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/
--
- Follow-Ups:
- 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:
- 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>
- [EP-tech] Ask about frequency of items-under-review mailings:
- Prev by Date: Re: [EP-tech] Search has no matches
- Next by Date: Re: [EP-tech] Ask about frequency of items-under-review mailings:
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):