diff --git a/product/ERP5Type/tests/runFunctionalTest.py b/product/ERP5Type/tests/runFunctionalTest.py
index 4fba6dad9ec83b78574203fcb26c68593eea0879..28f0287f24a517c91a900e2de49564487c13a614 100755
--- a/product/ERP5Type/tests/runFunctionalTest.py
+++ b/product/ERP5Type/tests/runFunctionalTest.py
@@ -20,6 +20,7 @@ Options:
   -h, --help                 this help screen
   --email_to_address=STRING  send results to this address by email (defaults to
                              erp5-report@erp5.org)
+  --smtp_host=hostname       specify SMTP server
   -s, --stdout               print the results on stdout instead of sending
                              results by email (unless email_to_address is also
                              passed explictly)
@@ -45,6 +46,7 @@ send_mail = 0
 stdout = 0
 debug = 0
 email_to_address = 'erp5-report@erp5.org'
+smtp_host = ''
 run_only=''
 
 tests_framework_home = os.path.dirname(os.path.abspath(__file__))
@@ -75,6 +77,7 @@ def parseArgs():
   global stdout
   global debug
   global email_to_address
+  global smtp_host
   global host
   global port
   global portal_name
@@ -83,7 +86,8 @@ def parseArgs():
   try:
     opts, args = getopt.getopt(sys.argv[1:],
           "hsd", ["help", "stdout", "debug",
-                 "email_to_address=", "host=", "port=", "portal_name=", "run_only="] )
+                 "email_to_address=", "host=", "port=", "portal_name=", "run_only=",
+                 "smtp_host="] )
   except getopt.GetoptError, msg:
     usage(sys.stderr, msg)
     sys.exit(2)
@@ -96,6 +100,8 @@ def parseArgs():
     elif opt == '--email_to_address':
       email_to_address = arg
       send_mail = 1
+    elif opt == '--smtp_host':
+      smtp_host = arg
     elif opt in ('-h', '--help'):
       usage(sys.stdout)
       sys.exit()
@@ -287,7 +293,8 @@ Following tests failed:
              status=status,
              attachments=[detail],
              from_mail='nobody@svn.erp5.org',
-             to_mail=[email_to_address])
+             to_mail=[email_to_address],
+             smtp_host=smtp_host)
   if stdout:
     print '-' * 79
     print subject
diff --git a/product/ERP5Type/tests/sendMail.py b/product/ERP5Type/tests/sendMail.py
index a7567e68a7ae4437f4b61fc67dffd9679ce00123..9ff704c16ffa6fadea64b599820820019a3e8844 100644
--- a/product/ERP5Type/tests/sendMail.py
+++ b/product/ERP5Type/tests/sendMail.py
@@ -40,7 +40,8 @@ def sendMail(subject,
              attachments = [],
              status = False,
              from_mail = 'nobody@erp5.org',
-             to_mail = [ 'erp5-report@erp5.org' ]):
+             to_mail = [ 'erp5-report@erp5.org' ],
+             smtp_host = ''):
     if attachments:
         msg = MIMEMultipart()
     else:
@@ -78,8 +79,8 @@ def sendMail(subject,
     else:
         msg.set_payload(body)
 
-    # Send the email via our own SMTP server.
-    s = smtplib.SMTP()
+    # Send the email via SMTP server.
+    s = smtplib.SMTP(smtp_host)
     s.connect()
     s.sendmail(from_mail, to_mail, msg.as_string())
     s.close()