[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Re: Notify on Approve



from eprints3/perl_lib/EPrints/Plugin/Screen/EPrint/RejectWithEmail.pm

    my $content = $self->{session}->html_phrase(
       "mail_bounce_body", <- this is a phase xml file, with you pins. 
The template for the mail
       title => $title,
       reason => $self->{session}->make_text(
          $self->{session}->param( "reason" ) ),
       edit_link => $edit_link );

    my $mail_ok = $user->mail(
       "cgi/users/edit_eprint:subject_bounce", <- this is the xml phase 
with the subjects
       $content, <- the content of the mail
       $self->{session}->current_user ) ;<- this sends to the owner of 
the eprints, the user which did the deposit.


Il 13/12/2012 17:39, Dimitrakakis Georgios ha scritto:
> That sounds very interesting! Could you please provide any
> files/references for that?
>
> For the moment I am trying to send the e-mail just to the depositing
> user and I have changed the "z_notify_authors.pl" file to something
> like this
>
>           my( $self ) = @_;
>
>           my $eprint = $self->{processor}->{eprint};
>
>           my $user= $eprint->get_user();
>           my $email = $user->mail();
>
>           return 1 if defined($email);
>
> but I guess I should define the $email to the "MoveWithAuthorEmail.pm"
> instead...
>
> Am I going to the right direction or not?
>
> Best,
>
> G.
>
>
>
>> At the Open University, we have recently implemented a function
>> (with the kind help of eprints services!) to send a notification to
>> the depositor plus the authors of an article when the article is
>> moved to live from the buffer (it doesn't include editors but could
>> do with a simple modification).  It makes use of the username entry
>> in the creators fields and user table to identify local authors (and
>>   get their email address from the user table) so may not be entirely
>>   helpful outside of our configuration, but it may be of some help?
>>
>> Alan
>> Repository Developer - Open Research Online (http://oro.open.ac.uk)
>> Library Services, The Open University, MK7 6AA, United Kingdom
>>
>> -----Original Message-----
>> From: Yuri [mailto:yurj at alfa.it]
>> Sent: 13 December 2012 14:05
>> To: eprints-tech at ecs.soton.ac.uk
>> Subject: [EP-tech] Re: Notify on Approve
>>
>> Il 13/12/2012 14:29, Dimitrakakis Georgios ha scritto:
>>> Indeed it's working!
>>>
>>> The only problem is that it doesn't send e-mail to the Editors but
>>> only to the authors as long as their e-mails are on the corresponding
>>> "z_notify_authors.pl" file.
>>>
>>> Is there any way to bypass/modify this/other file and send e-mail
>>> directly to the e-mail of the depositing user rather than the authors?
>> user->mail() does it by default. Check the code you can find on other
>> plugins (the reject one does send an email to the user).
>>
>>> Best,
>>>
>>> G.
>>>
>>>> Il 13/12/2012 12:44, Dimitrakakis Georgios ha scritto:
>>>>> I was wondering if someone has used the "Notify on Approve"
>>>>> functionality (found here: http://files.eprints.org/623/ ) with
>>>>> EPrints version 3.3.7 or higher!
>>>>>
>>>>> I see that there is a file for v.3.2.
>>>>>
>>>>> Is it going to work with v.3.3?
>>>>>
>>>> try it. Looking at it, it is quite similare to Move.pm so should work.
>>>> *** 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/
>>>>
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>> *** 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/
>> *** 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/
>>
>> --
>> The Open University is incorporated by Royal Charter (RC 000391), an
>>   exempt charity in England&  Wales and a charity registered in
>> Scotland (SC 038302).
>>
>>
>> *** 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/
>>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> *** 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/