I've got an SSIS package which includes a "Send Mail Task" event, but it's not sending any mail. I didn't set this package up, and my experience of SSIS extend purely to ad-hoc jobs in SQL Server and I'm having trouble working out why it's not sending mail.
No error is logged: the package is set to report to the windows event log, and the events are there but appear to have completed successfully.
The task uses a variety of variables, extracted by running select commands against the database, which under "properties" appear in the format
@[User::EmailRecipients]
I've stopped the package at a breakpoint just before the mail sends, and all these seem to be present and correct.
I've asked our network administrator to verify that the mail server has no record of attempts to mail out using the address in the "from" field, and he says not, including failed attempts at sending.
I'm at a loss as to what else I can do to try and work out why this is failing. Can anyone offer me some pointers?
EDIT - Variables
Several fields in the package property have been given "placeholder" values, such as "FromLine" being set to "[email protected]". However, under the "Expressions" field, there are the following settings
setting name variable
CCLine @[User::EmailOperators]
FromLine @[User::EmailSender]
ToLine @[User::EmailRecipients]
These have the expected values. The MessageSource is also set under this Expressions settings, and looks something like this (I've edited the text for privacy purposes.
"ghjgjgj - " + (DT_WSTR, 20) @[User::TotalCount] + " "
+ "\n dfgdfgfdgdfg - " + (DT_WSTR, 20) (@[User::TotalDistinctCount])
+ "\n dsfsfsdfsf - " + (DT_WSTR, 20)@[User::TotalPotCount] + "\n fgdgdg - " + (DT_WSTR, 20)@[User::TotalDuplicateCount]
+ "\n\n sdfgdgdg: \n " + @[User::CustomerText]
+ "\n\n dfgdfgdg:\n\n" + @[User::UserText] + "\n"
In addition the connection has a nonsense IP address set for SMTP Server. But again, under the expressions property, there's a value which says
ConnectionString "SmtpServer=" + @[User::SMTPServer] + ";UseWindowsAuthentication=False;EnableSsl=False;"
The variable SMTPServer also has the expected value when the step executes.