C
Code Monkey
I'm using the following code to send emails:
<code>
public Boolean SendEmail(String _fromAddress, String _toAddress,
String _subject, String _message)
{
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress(_fromAddress);
smtpClient.Host = "10.0.0.230";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add(_toAddress);
message.Subject = _subject;
message.IsBodyHtml = true;
message.Body = _message;
smtpClient.Send(message);
return true;
}
catch
{
return false;
}
}
</code>
Nothing special or strange about that. The problem I've got is that
when the email gets sent to internal email addresses, the email ends
up the their 'Deleted Items' box. There's no rules sent up on either
Outlook (2003) or Exchange (2000) to move emails from one box to
another.
The _message string is the HTML returned from a webpage.
Can anyone shed any light or ideas on this problem?
TIA.
<code>
public Boolean SendEmail(String _fromAddress, String _toAddress,
String _subject, String _message)
{
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress(_fromAddress);
smtpClient.Host = "10.0.0.230";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add(_toAddress);
message.Subject = _subject;
message.IsBodyHtml = true;
message.Body = _message;
smtpClient.Send(message);
return true;
}
catch
{
return false;
}
}
</code>
Nothing special or strange about that. The problem I've got is that
when the email gets sent to internal email addresses, the email ends
up the their 'Deleted Items' box. There's no rules sent up on either
Outlook (2003) or Exchange (2000) to move emails from one box to
another.
The _message string is the HTML returned from a webpage.
Can anyone shed any light or ideas on this problem?
TIA.