G
Guest
Hi There.
I have a small c# problem. I am trying to create a dynamic email body. The
body may be larger than the maximum number of characters a string can have
(256?). I build the string like this:
private void SendEmail()
{
string body = "";
foreach(row in a dataset)
{
body += "First Name: " + dr["FNAME"].ToString();
body += "Last Name: " + dr["LNAME"].ToString();
....a number of different fields to follow.....
body +=" <br><hr>";//add some divider and go to the next record
}
MailMessage msg = new MailMessage();
msg.Body = body; //add the generated text to the email body
SmtpServer smtpServer = new SmtpServer();
smtpServer.Send(msg);
}
Now the email gets sent without any problems, but the body of the email is
cut-off after a certain number of characters.
How can I create an email body that can grow the way I need it to?
Thanks in advance.
Thanks,
John Scott.
I have a small c# problem. I am trying to create a dynamic email body. The
body may be larger than the maximum number of characters a string can have
(256?). I build the string like this:
private void SendEmail()
{
string body = "";
foreach(row in a dataset)
{
body += "First Name: " + dr["FNAME"].ToString();
body += "Last Name: " + dr["LNAME"].ToString();
....a number of different fields to follow.....
body +=" <br><hr>";//add some divider and go to the next record
}
MailMessage msg = new MailMessage();
msg.Body = body; //add the generated text to the email body
SmtpServer smtpServer = new SmtpServer();
smtpServer.Send(msg);
}
Now the email gets sent without any problems, but the body of the email is
cut-off after a certain number of characters.
How can I create an email body that can grow the way I need it to?
Thanks in advance.
Thanks,
John Scott.