+ # traitement du corps de message pour y remplacer :
+ # http://coda.auf/coda/…
+ # par :
+ # Accès depuis une implantation AUF : http://coda.auf/coda/…
+ # Accès depuis Internet : https://coda.auf.org/coda/…
+ if part.get_content_type() == 'text/plain':
+ text = part.get_payload(decode=True)
+ new_text = re.sub(BODY_PATTERN_1, BODY_FORMAT_1, text)
+ new_text = re.sub(BODY_PATTERN_2, BODY_FORMAT_2, new_text)
+ if new_text != text:
+ del part['Content-Transfer-Encoding']
+ part.set_payload(new_text, qp_charset)
+ continue
+ # traitement uniquement si c'est un attachement de PDF