--- sendxmpp.1.20	2010-04-27 15:04:57.000000000 +0100
+++ sendxmpp	2010-04-27 15:21:11.000000000 +0100
@@ -178,7 +178,7 @@
 		# account with specific connection host
 		if ($config{'jserver'}	=~ /(.*);([-\.\w]+)/) {
 			$config{'jserver'}	= $2;
-			$config{'username'}	.= "\@$1";
+			$config{'username'}	.= "\@$1" unless $config{'component'};
 		}
 	}
 
@@ -405,7 +405,7 @@
     my ($cnx, $rcpt, $comp, $subject, $message_type, $msg) = @_;
 
     # for some reason, MessageSend does not return anything
-    $cnx->MessageSend('to'      => $rcpt . ( $comp ? "\@$comp" : '' ),
+    $cnx->MessageSend('to'      => $rcpt . ( ($comp && $rcpt !~ /@/) ? "\@$comp" : '' ),
 		'type'		=> $message_type,
 		'subject'	=> $subject,
 		'body'		=> $msg);
