diff --git a/RAAspotter.py b/RAAspotter.py
index a6597e064b31213f36eb385669cad0dfb4bd127c..2c45158d05ac93d73b2d4ced4d9fa9ecb61a0bfa 100644
--- a/RAAspotter.py
+++ b/RAAspotter.py
@@ -58,6 +58,7 @@ class RAAspotter:
     self.tor_max_requests = 0
     self.tor_requests     = 0
     self.not_before       = datetime.datetime(1970, 1, 1)
+    self.smtp_configured  = False
 
     self.update_user_agent(user_agent)
 
@@ -243,39 +244,63 @@ class RAAspotter:
   def get_raa(self, page_content):
     logger.error('Cette fonction doit être surchargée')
 
-  def mailer(smtp_host, smtp_username, smtp_password, smtp_port,
-             smtp_starttls, smtp_ssl, email_from, email_to, email_object, 
-             email_content):
-    try:
-      message = EmailMessage()
-      message.set_content(email_content)
-
-      message['Subject'] = email_object
-      message['From'] = email_from
-
-      context = ssl.create_default_context()
-
-      if smtp_ssl == True:
-        for address in email_to.split(','):
-          message['To'] = address
-          smtp = smtplib.SMTP_SSL(smtp_host, port, context=context)
-          smtp.login(smtp_username, smtp_password)
-          smtp.send_message(message)
-          smtp.quit()
-      elif smtp_starttls == True:
-        for address in email_to.split(','):
-          message['To'] = address
-          smtp = smtplib.SMTP(smtp_host)
-          smtp.starttls(context=context)
-          smtp.login(smtp_username, smtp_password)
-          smtp.send_message(message)
-          smtp.quit()
-      else:
-        for address in email_to.split(','):
-          message['To'] = address
-          smtp = smtplib.SMTP(smtp_host)
-          smtp.login(smtp_username, smtp_password)
-          smtp.send_message(message)
-          smtp.quit()
-    except Exception as exc:
-      logger.warning(f'Impossible d\'envoyer le courrier électronique : {exc}')
+  def configure_mailer(self, smtp_host, smtp_username, smtp_password,
+                       smtp_port, smtp_starttls, smtp_ssl, email_from,
+                       email_to, email_object):
+    self.smtp_host     = smtp_host
+    self.smtp_username = smtp_username
+    self.smtp_password = smtp_password
+    if smtp_port <= 0:
+      self.smtp_port   = 587
+    else:
+      self.smtp_port   = int(smtp_port)
+    self.smtp_starttls = smtp_starttls
+    self.smtp_ssl      = smtp_ssl
+    self.email_from    = email_from
+    self.email_to      = email_to
+    self.email_object  = email_object
+
+    if smtp_host and smtp_username and smtp_password and email_from and email_to and email_object:
+      self.smtp_configured = True
+
+  def mailer(self):
+    if self.smtp_configured and self.found:
+      try:
+        message = EmailMessage()
+        message.set_content(open(self.output_file_path).read())
+
+        message['Subject'] = self.email_object
+        message['From'] = self.email_from
+
+        context = ssl.create_default_context()
+
+        if self.smtp_ssl == True:
+          for address in self.email_to.split(','):
+            del message['To']
+            message['To'] = address
+            smtp = smtplib.SMTP_SSL(self.smtp_host, port, context=context)
+            if self.smtp_username:
+              smtp.login(self.smtp_username, self.smtp_password)
+            smtp.send_message(message)
+            smtp.quit()
+        elif self.smtp_starttls == True:
+          for address in self.email_to.split(','):
+            del message['To']
+            message['To'] = address
+            smtp = smtplib.SMTP(self.smtp_host)
+            smtp.starttls(context=context)
+            if self.smtp_username:
+              smtp.login(self.smtp_username, self.smtp_password)
+            smtp.send_message(message)
+            smtp.quit()
+        else:
+          for address in self.email_to.split(','):
+            del message['To']
+            message['To'] = address
+            smtp = smtplib.SMTP(self.smtp_host)
+            if self.smtp_username:
+              smtp.login(self.smtp_username, self.smtp_password)
+            smtp.send_message(message)
+            smtp.quit()
+      except Exception as exc:
+        logger.warning(f'Impossible d\'envoyer le courrier électronique : {exc}')
diff --git a/RAAspotter_ppparis.py b/RAAspotter_ppparis.py
index 412dabcf54eb3bc150c0e2f557adf386614f600c..7c09dbdb7592238083f46ecb010d9421940e06c4 100644
--- a/RAAspotter_ppparis.py
+++ b/RAAspotter_ppparis.py
@@ -23,6 +23,7 @@ class RAAspotter_ppparis(RAAspotter):
     page_content = self.get_session()
     raa_elements = self.get_raa_elements(page_content)
     self.parse_raa(raa_elements, keywords.split(','))
+    self.mailer()
 
   def get_raa_elements(self, page_content):
     elements = []
diff --git a/RAAspotter_pref13.py b/RAAspotter_pref13.py
index 7d56006f6325ce3788d85fc4c0220e96709935a3..a7cf2c207c4751809671ed526eada24bee4178ca 100644
--- a/RAAspotter_pref13.py
+++ b/RAAspotter_pref13.py
@@ -32,6 +32,8 @@ class RAAspotter_pref13(RAAspotter):
       raa_elements = self.get_raa_elements(page_content)
       self.parse_raa(raa_elements, keywords.split(','))
 
+    self.mailer()
+
   def get_raa_elements(self, page_content):
     elements = []
     # On charge le parser
diff --git a/RAAspotter_pref35.py b/RAAspotter_pref35.py
index e7765b4e2361cbc3370615ed47daf97ef457c76e..67dd21dc589d05646094b5f49a638d619fab5c4e 100644
--- a/RAAspotter_pref35.py
+++ b/RAAspotter_pref35.py
@@ -32,6 +32,8 @@ class RAAspotter_pref35(RAAspotter):
       raa_elements = self.get_raa_elements(page_content)
       self.parse_raa(raa_elements, keywords.split(','))
 
+    self.mailer()
+
   def get_raa_elements(self, page_content):
     elements = []
     # On charge le parser
diff --git a/ppparis.py b/ppparis.py
index e108a1660cb6613a067bdc8bfaf0233a11ec88d7..7b4678e15217f75f73ba439889c779119b1931aa 100755
--- a/ppparis.py
+++ b/ppparis.py
@@ -88,11 +88,7 @@ os.makedirs(__DATA_DIR, exist_ok=True)
 
 raa_spotter = RAAspotter_ppparis(__DATA_DIR)
 raa_spotter.not_before = __NOT_BEFORE
+raa_spotter.configure_mailer(__SMTP_HOSTNAME, __SMTP_USERNAME, __SMTP_PASSWORD, __SMTP_PORT,
+                             __SMTP_STARTTLS, __SMTP_SSL, __EMAIL_FROM, __EMAIL_TO,
+                             '[RAAspotter] [ppparis] Nouveaux éléments trouvés')
 raa_spotter.get_raa(__KEYWORDS)
-
-if raa_spotter.found == True and __SMTP_HOSTNAME and __SMTP_USERNAME and __SMTP_PASSWORD and __SMTP_PORT and __EMAIL_TO and __EMAIL_FROM:
-  output = open(raa_spotter.output_file_path)
-  RAAspotter.mailer(__SMTP_HOSTNAME, __SMTP_USERNAME, __SMTP_PASSWORD, __SMTP_PORT,
-                    __SMTP_STARTTLS, __SMTP_SSL, __EMAIL_FROM, __EMAIL_TO,
-                    '[RAAspotter] [ppparis] Nouveaux éléments trouvés', 
-                    output.read())
diff --git a/pref13.py b/pref13.py
index 87b64f45cc524354d7668d4d7e7209c4c865894b..75eadcbacf712a0761683cb3d7ee211e66666953 100755
--- a/pref13.py
+++ b/pref13.py
@@ -88,11 +88,7 @@ os.makedirs(__DATA_DIR, exist_ok=True)
 
 raa_spotter = RAAspotter_pref13(__DATA_DIR)
 raa_spotter.not_before = __NOT_BEFORE
+raa_spotter.configure_mailer(__SMTP_HOSTNAME, __SMTP_USERNAME, __SMTP_PASSWORD, __SMTP_PORT,
+                             __SMTP_STARTTLS, __SMTP_SSL, __EMAIL_FROM, __EMAIL_TO,
+                             '[RAAspotter] [pref13] Nouveaux éléments trouvés')
 raa_spotter.get_raa(__KEYWORDS)
-
-if raa_spotter.found == True and __SMTP_HOSTNAME and __SMTP_USERNAME and __SMTP_PASSWORD and __SMTP_PORT and __EMAIL_TO and __EMAIL_FROM:
-  output = open(raa_spotter.output_file_path)
-  RAAspotter.mailer(__SMTP_HOSTNAME, __SMTP_USERNAME, __SMTP_PASSWORD, __SMTP_PORT,
-                    __SMTP_STARTTLS, __SMTP_SSL, __EMAIL_FROM, __EMAIL_TO,
-                    '[RAAspotter] [pref13] Nouveaux éléments trouvés', 
-                    output.read())
diff --git a/pref35.py b/pref35.py
index 70c544d256c1cedfc1db5394e573fd7c0ae3e87f..5de33c61eb5bbc9b26be19e2df1969c86880ff30 100755
--- a/pref35.py
+++ b/pref35.py
@@ -88,11 +88,7 @@ os.makedirs(__DATA_DIR, exist_ok=True)
 
 raa_spotter = RAAspotter_pref35(__DATA_DIR)
 raa_spotter.not_before = __NOT_BEFORE
+raa_spotter.configure_mailer(__SMTP_HOSTNAME, __SMTP_USERNAME, __SMTP_PASSWORD, __SMTP_PORT,
+                             __SMTP_STARTTLS, __SMTP_SSL, __EMAIL_FROM, __EMAIL_TO,
+                             '[RAAspotter] [ppparis] Nouveaux éléments trouvés')
 raa_spotter.get_raa(__KEYWORDS)
-
-if raa_spotter.found == True and __SMTP_HOSTNAME and __SMTP_USERNAME and __SMTP_PASSWORD and __SMTP_PORT and __EMAIL_TO and __EMAIL_FROM:
-  output = open(raa_spotter.output_file_path)
-  RAAspotter.mailer(__SMTP_HOSTNAME, __SMTP_USERNAME, __SMTP_PASSWORD, __SMTP_PORT,
-                    __SMTP_STARTTLS, __SMTP_SSL, __EMAIL_FROM, __EMAIL_TO,
-                    '[RAAspotter] [pref35] Nouveaux éléments trouvés', 
-                    output.read())