Re: mailutils.send_mail with multiple recipients sends mail only to the first recipient [FOUND IT]

2013-12-05 Thread Theodoros Theodoropoulos

I found the culprit! It's remove_temporary_emails() !

Although the function works as expected (tried it), it changes 'toaddr' 
from list of strings, to strings.


Here's the code:

if type(toaddr) is str:
toaddr = toaddr.strip().split(',')

up to here toaddr it's definitely list of strings...

toaddr = remove_temporary_emails(toaddr)

Here it's a simple string

Then things start to not work as expected.

If I comment out remove_temporary_emails, everything works as expected.

I'll post a ticket. remove_temporary_emails should return list of strings.


On 6/12/2013 8:39 πμ, Theodoros Theodoropoulos wrote:

Correction:
(I also tried using list of strings in the TOADDR, with the same 
results)
meaning: mailutils.send_email("serverurl", ["email1","email2"], 
subject="test", content="test content", debug_level=9)






Re: mailutils.send_mail with multiple recipients sends mail only to the first recipient

2013-12-05 Thread Theodoros Theodoropoulos

Correction:

(I also tried using list of strings in the TOADDR, with the same results)
meaning: mailutils.send_email("serverurl", ["email1","email2"], 
subject="test", content="test content", debug_level=9)


Re: mailutils.send_mail with multiple recipients sends mail only to the first recipient

2013-12-05 Thread Theodoros Theodoropoulos

On 5/12/2013 7:06 μμ, Theodoros Theodoropoulos wrote:

from invenio import mailutils
mailutils.send_email("[serverurl]","[email1],[email2]",subject="test",content="test 
content", debug_level=9)
and I see that it's only send to the FIRST email address! (BTW, both 
emails are valid and working :) but i )

FYI, the above SAME code in invenio 0.99.x branch works without problems!!

If you can verify my findings, I think I should create a ticket with 
'critical' priority (because mails could be lost if not fixed)

(I also tried using list of strings in the replyto, with the same results)

Cheers,
Theodoros





mailutils.send_mail with multiple recipients sends mail only to the first recipient

2013-12-05 Thread Theodoros Theodoropoulos

Hello all,

Strange as it might seem, I'm trying to send an email from a webfunction 
to two recipients and it's only delivered to the first one!


I tried the same addresses using mailutils in ipython:

from invenio import mailutils
mailutils.send_email("[serverurl]","[email1],[email2]",subject="test",content="test 
content", debug_level=9)


and I see that it's only send to the FIRST email address! (BTW, both 
emails are valid and working :) but i )


Having said that, when I enable CFG_DEVEL_SITE=1 and run THE SAME command,
as an admin I get an email that shows both addresses, so it's not an 
issue of splitting the email strings etc, but something deeper... (maybe 
python-related?)


Can you verify it too? It seems a bit strange to be a bug and not having 
been reported by anyone else, on the other hand, I cannot find anything 
wrong with my tests... Hmmm...


Best regards,
Theodoros


Re: Webaccess and embargo

2013-12-05 Thread Samuele Kaplun
Hi Johnny,

In data mercoledì 4 dicembre 2013 08:39:01, Johnny Mariéthoz ha scritto:
> thus considering the two following approaches, which one is the best:
> 
> - enrich the user_info by the list of roles (but as you wrote it can be
> somehow recursive) 

Exactly, it can't really properly work.

> - defined a kb with the institution code as key, and the
> ip rules as values and enrich the user_info with these informations

Indeed this is even a nicer formulation. I wonder if it can become slightly a 
performance impact... surely it's going to be slower and slower the more 
network ranges you'd put in this KB. We can cache this computation per 
session, but guests users will typically have a different session per every 
guest request.

I guess in next this will happily be cached in redis...

Cheers,
Sam

 
-- 
Samuele Kaplun
Invenio Developer ** 
INSPIRE Service Manager ** 


Re: (simple?) search question

2013-12-05 Thread Tibor Simko
On Tue, 03 Dec 2013, tibor.si...@cern.ch wrote:
> Good to have another use case for this, just-in-time.  I'll make a
> ticket.

Here it is:

   http://invenio-software.org/ticket/1659

Best regards
--
Tibor Simko