[mails] Mail de bienvenue bilingue

This commit is contained in:
Valentin Samir 2013-08-29 21:20:49 +02:00
parent 6db33c926f
commit 9c1cfbe8d1
6 changed files with 74 additions and 80 deletions

View file

@ -4,72 +4,6 @@
""" Templates de mails. """ """ Templates de mails. """
#: Mail de bienvenue
#:
#: (From est respbats@crans.org)
txt_mail_bienvenue = u"""From: Crans <%(From)s>
To: %(To)s
Subject: [CRANS] Bienvenue au Cr@ns !
Content-Type: text/plain; charset="utf-8"
Bienvenue !
Si tu lis ce mail, c'est que ton inscription à l'association
s'est déroulée correctement.
Le CR@NS est une association gérée, autant d'un point de vue
administratif que technique, par des étudiants bénévoles pour les
étudiants résidant sur le campus.
Ses membres actifs s'occupent de la maintenance du réseau, et des adhésions
(câblages), ainsi que de plusieurs services mis à la
disposition de tous ses adhérents :
* La connexion à Internet en filaire et en wifi
<https://wiki.crans.org/WiFi>
* Un wiki, regroupant plein d'informations diverses concernant la vie ici.
<https://wiki.crans.org>
* Les news, fora de discussion abordant divers thèmes
<https://wiki.crans.org/VieCrans/ForumNews>
* Un canal IRC <https://wiki.crans.org/VieCrans/UtiliserIrc>
* Un client de messagerie instantanée Jabber
<https://wiki.crans.org/VieCrans/UtiliserJabber>
* Un service de messagerie : une adresse mail @crans.org disponible à
vie, fiable, et avec possibilité d'installer des filtres très précis**
* Un espace personnel *de 2Go sur le serveur des adhérents *
<https://wiki.crans.org/VieCrans/GestionCompte>
* Un service d'impression, 24h/24 7j/7, A3 ou A4, couleur ou noir et
blanc, avec ou sans agrafe, à prix coûtant
<https://wiki.crans.org/VieCrans/Intranet>
* La télévision par le réseau <https://wiki.crans.org/TvReseau>
Afin *d'assurer le bon fonctionnement de ces services*, il est
nécessaire que chaque membre respecte la charte signée lors de son
inscription. <https://wiki.crans.org/CransAdministratif/CharteDuCrans>
La notice d'utilisation des services du CR@NS est disponible ici :
https://wiki.crans.org/CransPratique. Nous conseillons vivement de s'y reporter
aussi bien pour apprendre à utiliser les différents services que pour
résoudre les problèmes éventuellement rencontrés.
* Chaque membre intéressé par le fonctionnement de l'association peut par
exemple contacter l'équipe technique à nounous@crans.org ou l'équipe
administrative à ca@crans.org et/ou se rendre aux réunions publiques du
CR@NS. <https://wiki.crans.org/CompteRendusCrans>. Aucune
connaissance technique préalable n'est requise pour participer ! *
*A noter* : l'accès aux news et au wiki est limité à un usage interne
au campus.
Pour accéder depuis l'extérieur
* au wiki, il faut se créer un compte
<http://wiki.crans.org/?action=newaccount>
* aux news, il faut s'identifier
(Utilisateur : Vivelapa / Mot de passe : ranoia!)
--\u0020
Les membres actifs.
PS: Il t'est conseillé de conserver ce mail à toutes fins utiles
"""
#: Mail envoyé à un adhérent qui obtient de nouveaux droits. #: Mail envoyé à un adhérent qui obtient de nouveaux droits.
txt_ajout_droits = u"""From: Crans <%(From)s> txt_ajout_droits = u"""From: Crans <%(From)s>
To: %(To)s To: %(To)s

View file

@ -9,6 +9,7 @@ sys.path.append('/usr/scripts/gestion')
from affich_tools import cprint, anim, OK, WARNING, ERREUR from affich_tools import cprint, anim, OK, WARNING, ERREUR
import config import config
import config.mails import config.mails
import mail as mail_module
from time import strftime from time import strftime
from ldap_crans import hostname, crans_ldap from ldap_crans import hostname, crans_ldap
@ -170,7 +171,7 @@ class mail_bienvenue:
else: else:
To += '@crans.org' To += '@crans.org'
conn=smtplib.SMTP('localhost') conn=smtplib.SMTP('localhost')
conn.sendmail(From, To, config.mails.txt_mail_bienvenue.encode('utf-8') % { 'From': From, 'To': To }) conn.sendmail(From, To, mail_module.generate('bienvenue', { 'From': From, 'To': To, 'lang_info': 'English version below' }).as_string())
conn.quit() conn.quit()
print OK print OK
except Exception, c: except Exception, c:

5
gestion/mail/__init__.py Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from mail import *

View file

@ -0,0 +1,52 @@
Welcome!
========
If you read this email, your registration at the association Cr@ns was successful.
Cr@ns is a volunteer-run organization for and by students living on campus.
Its active members are involved in the maintenance of the network , membership
registration (*câblages*) , and several other services available to all members
among which:
* Wired and wireless[1] Internet connection;
* A wiki , gathering full of various information about life around Cachan [2] ;
* A newsgroup server [3] ;
* An IRC server [4] ;
* A Jabber IM server [5] ;
* A mail service : a reliable mail address @crans.org [6 ] ;
* A personal space of **2GB** on the server members [7] ;
* A print service 24h/24 7/7 , A3 or A4, color or black and white, with or
without clip, at cost [8];
* TV by the network [9] .
To ensure the proper functioning of these services, it is necessary that each
member respects the rules [10] agreed at registration.
The instructions for use of the Cr@ns services is available at:
<https://wiki.crans.org/CransPratique> . We urge you to refer to it, to learn
how to use the various services, or for resolve any problems encountered.
Each member interested in the functioning of the association may contact
the technical team at <nounous@crans.org> or the administrative team
at <ca@crans.org> and / or attend public meetings [11].
**No prior technical knowledge is required to participate!**
**Note**: An authentication is require to access news and wiki
from outside the campus:
* For access to the wiki from outside, you must create an account [12] .
* For access to the news from outside , you must identify
( User: Vivelapa / Password: ranoia ! )
--
The active members.
{% include 'bienvenue/body/links' %}
PS : It is recommended that you keep this email

View file

@ -51,17 +51,6 @@ un usage interne au campus.
Les membres actifs. Les membres actifs.
[1]: <https://wiki.crans.org/WiFi> {% include 'bienvenue/body/links' %}
[2]: <https://wiki.crans.org>
[3]: <https://wiki.crans.org/VieCrans/ForumNews>
[4]: <https://wiki.crans.org/VieCrans/UtiliserIrc>
[5]: <https://wiki.crans.org/VieCrans/UtiliserJabber>
[6]: <https://wiki.crans.org/VieCrans/LesMails>
[7]: <https://wiki.crans.org/VieCrans/GestionCompte>
[8]: <https://wiki.crans.org/VieCrans/ImpressionReseau>
[9]: <https://wiki.crans.org/TvReseau>
[10]: <https://wiki.crans.org/CransAdministratif/R%C3%A8glementInt%C3%A9rieur>
[11]: <https://wiki.crans.org/CompteRendusCrans>
[12]: <http://wiki.crans.org/?action=newaccount>
PS: Il t'est conseillé de conserver ce mail à toutes fins utiles PS: Il t'est conseillé de conserver ce mail à toutes fins utiles

View file

@ -0,0 +1,13 @@
[1]: <https://wiki.crans.org/WiFi>
[2]: <https://wiki.crans.org>
[3]: <https://wiki.crans.org/VieCrans/ForumNews>
[4]: <https://wiki.crans.org/VieCrans/UtiliserIrc>
[5]: <https://wiki.crans.org/VieCrans/UtiliserJabber>
[6]: <https://wiki.crans.org/VieCrans/LesMails>
[7]: <https://wiki.crans.org/VieCrans/GestionCompte>
[8]: <https://wiki.crans.org/VieCrans/ImpressionReseau>
[9]: <https://wiki.crans.org/TvReseau>
[10]: <https://wiki.crans.org/CransAdministratif/R%C3%A8glementInt%C3%A9rieur>
[11]: <https://wiki.crans.org/CompteRendusCrans>
[12]: <http://wiki.crans.org/?action=newaccount>