Argument "SMTP" for option "connection" is not valid. The command line parameters are invalid.
Posted by Russell Wright on November 18, 2013
When scheduling an SSIS package deployed to SQL Server the job failed. The job history indicates my SMTP connection is invalid for some reason. So, I checked the command line created by the job scheduler.
Argument “SMTP” for option “connection” is not valid. The command line parameters are invalid. The step failed.
What you will see is the /CONNECTION parameter for the SMTP connection manager is enclosed in “\ and \” characters. Not sure why, but you can see this is also the case for the SQL Server connection manager, but it doesn’t suffer from the same problem.
/CONNECTION “SMTP Connection Manager”; “\”SmtpServer=smtp.mail.mycompany.com;UseWindowsAuthentication=False;EnableSsl=False;\””
/CONNECTION “SMTP Connection Manager”; “SmtpServer=smtp.mail.mycompany.com;UseWindowsAuthentication=False;EnableSsl=False;”
Making this simple change seems to have corrected the issue.