Esta version es practica para procedimientos que solo envien.
declare @SQL_Command VarCHar(500) declare @TEXTO VarChar(10) SET @TEXTO = 'XX04122004' SET @SQL_Command = 'EXEC master..xp_cmdshell ' + '''' + 'postie.exe -mx -host:mail.server.tuyo.com -to:test@bubble.net -from:test@bubble.com -s:"asunto de prueba" -msg:"Mensaje de prueba ' + @TEXTO + '''' print @SQL_Command EXEC (@SQL_Command