Beispiel #1
0
def notificar(mails):
    if len(mails)==1:
        sfrom = (mails[0]['From'][:37] + '...') if len(mails[0]['From']) > 40 else mails[0]['From']
        os.system(osd_notifier+" \"New Mail: "+userpwd.get_user_name()+ "\" "+"\"From:\n"+ sfrom +"\nSubject:\n"+ mails[0]['Subject'] + "\"")
    elif len(mails)>1:
        os.system(osd_notifier+" \"New Mails: "+userpwd.get_user_name()+"\" \""+ str(count) + " New messages.\"")
Beispiel #2
0
def notificar(mails):
	if len(mails)==1:
		sfrom = (mails[0]['From'][:37] + '...') if len(mails[0]['From']) > 40 else mails[0]['From']
		os.system(osd_notifier+" \"Nuevo Mensaje: "+userpwd.get_user_name()+ "\" "+"\"De:\n"+ sfrom +"\nAsunto:\n"+ mails[0]['Subject'] + "\"")
	elif len(mails)>1:
		os.system(osd_notifier+" \"Nuevos Mensajes: "+userpwd.get_user_name()+"\" \""+ str(count) + " nuevos mensajes.\"")