I am trying to send an email of a SQL table out in email using a script task in SSIS.
I got everything working but the rows are not aligned properly when the email succeeds. I see that "\t" creates a tab in C # but this is relative to where the last row ended.
So I am looking to see what I need to do so that everything in my second and 3rd row start from the same line regardless of the length of the 1st row. .
End Result looks like this
if (varCollection["User::EmailMessageDEV"].Value == string.Empty)
{
header = "Load Status Report Dev\n\n";
header += string.Format("{0}\t\t\t\t{1}\t\t{2}\t\n", "Pkg_Name", "DateRan","Server");
varCollection["User::EmailMessageDEV"].Value = header;
}
//"{0}\t{1}\t{2}"
//Format the query result with tab delimiters
message = string.Format("{0}\t\t\t\t{1}\t\t{2}\t\n",
varCollection["User::Pkg_Name"].Value,
varCollection["User::DateRan"].Value,
varCollection["User::Server"].Value);
//varCollection["User::ENDDATE"].Value),
//varCollection["User::COMPLETED"].Value);
varCollection["User::EmailMessageDEV"].Value = varCollection["User::EmailMessageDEV"].Value + message;