J
jp2msft
I've got some code that is chopping my subject line on the messages I
receive, and I do not know why.
Our server is running Active Directory and SQL Server 2000 Enterprise.
The email is sent, but all we see in the subject line is "S".
Here is what I am doing:
receive, and I do not know why.
Our server is running Active Directory and SQL Server 2000 Enterprise.
The email is sent, but all we see in the subject line is "S".
Here is what I am doing:
Code:
private bool SendMessage(string fcn)
{
MailMessage email = new MailMessage(fcn, fcn);
email.SubjectEncoding = Encoding.Unicode;
email.BodyEncoding = Encoding.Unicode;
email.Subject = string.Format("SystemID {0} - {1}", m_systemId,
m_coil.SerialNumber);
string fmt = "<html><body bgcolor={0}><div><h3>Coil {1}<br/><font
color=\"red\">{2}</font> Approved Override For {3}</h3><hr><table border=1>";
string body1 = string.Format(fmt, split.Panel1.BackColor.Name,
m_coil.SerialNumber, m_dbase.Supervisor.FullName, m_dbase.Employee.FullName);
string body2 = string.Empty;
foreach (ListViewItem i in ListView1.Items)
{
if (i.ImageKey == "stop.ico")
{
body2 += string.Format("<tr><td>{0} Issue:</td><td><b><font
color=\"green\">{1}</font></b></td></tr>", i.SubItems[0].Text,
i.SubItems[1].Text);
}
}
if (0 < body2.Length)
{
string body3 = "</table><hr></div><div>End Of File</div></body></html>";
email.IsBodyHtml = true;
email.Body = body1 + body2 + body3;
SmtpClient Client = new SmtpClient("172.16.8.200");
try
{
Client.Send(email);
}
catch (Exception err)
{
Console.WriteLine(err.Message);
}
finally
{
email.Dispose();
}
}