I have an application in ASP.net that sends an email when an error occurs. In the email, it sends the subject line, then in the body, I have the error that occurred and the ID of the person.
In the body, it is sending this:
Invalid object name.4
I need something like this:
Error is: Invalid object name
ID: 4
I've tried doing this but it doesn't work also. Can anyone help me out?
emailerror.SendEmailError("An Error Occurred", "Error is: " + response + "ID: " + id);
I have the email class here:
In the body, it is sending this:
Invalid object name.4
I need something like this:
Error is: Invalid object name
ID: 4
I've tried doing this but it doesn't work also. Can anyone help me out?
emailerror.SendEmailError("An Error Occurred", "Error is: " + response + "ID: " + id);
I have the email class here:
Code:
public void SendEmailError(string subject, string message)
{
try
{
string[] emailto = { "" };
string[] emailfrom = { "" };
string emailsubject = subject;
string[] emailcc = null;
string[] emailbc = null;
string[] emailbody = { message };
string[] emailatname = null;
int attachcount = 0;
byte[][] emailattach = new byte[attachcount][];
TEST.MailService.MailServices MS = new Test.MailService.MailServices();
string temp = MS.SendService(emailto, emailfrom, emailcc, emailbc, emailbody, emailatname, emailsubject, emailattach);
}
catch
{
}
}