--- smtp.module	2010-08-04 19:52:04.000000000 +0200
+++ smtp.module.new	2010-08-14 11:04:06.537515018 +0200
@@ -714,8 +714,8 @@ function smtp_drupal_mail_wrapper($messa
 
 
   // Set other connection settings.
-  $mail->Host   = variable_get('smtp_host', '') .';'. variable_get('smtp_hostbackup', '');
-  $mail->Port   = variable_get('smtp_port', '25');
+  $mail->Host   = trim(variable_get('smtp_host', '')) .';'. trim(variable_get('smtp_hostbackup', ''));
+  $mail->Port   = trim(variable_get('smtp_port', '25'));
   $mail->Mailer = 'smtp';
 
 
