Using Object Model in ASP.NET
The sample source is in C:\Program Files\Lencom Software Inc\Fast E-Delivery Engine\Samples\FEDE ASP.NET Sample.zip
private void ButtonSend_Click(object sender, System.EventArgs e)
{
if ( (TextBoxFrom.Text != null && TextBoxFrom.Text.Length == 0) ||
(TextBoxTo.Text != null && TextBoxTo.Text.Length == 0) ||
(TextBoxSubject.Text != null && TextBoxSubject.Text.Length == 0)
) return;
string Address = TextBoxTo.Text;
EmailSender.Message message = new Message();
message.From = TextBoxFrom.Text;
message.To = Address;
message.Subject = TextBoxSubject.Text;
message.MimeFormatted = false; // If the letter is in the text format, then MimeFormatted = false
message.TextBody = TextBoxBody.Text;
Result result = emailSender.Send(message, message.To);
TextBoxLog.Text = string.Format("Sent to: {0} \r\n", message.To);
TextBoxLog.Text += string.Format("Result: {0} \r\n", result.SMTPMessage);
TextBoxLog.Text += string.Format("Log: {0} \r\n", result.Log);
}
Instructions
1.Add access rigths for ASPNET user to:
C:\Documents and Settings\All Users\Application Data\Lencom
Troubleshoot
1. Register Object Model
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\regasm C:\Program Files\Lencom Software Inc\Fast E-Delivery Engine\EmailSender.dll /codebase
|