Here is the code. StrSMTPAddress is the IP address of the SMTP server
Private NewMessage As System.Web.Mail.MailMessage
Private NewMail As Mail.SmtpMail
NewMessage = New Mail.MailMessage
NewMessage.To = Trim(StrTo)
NewMessage.From = Trim(StrFrom)
If StrCC & "" > "" Then
NewMessage.Cc = Trim(StrCC)
End If
NewMessage.Subject = Trim(StrSubject)
NewMessage.Body = Trim(StrBody)
NewMessage.BodyFormat = Mail.MailFormat.Html
NewMail.SmtpServer = StrSMTPServer
Try
NewMail.Send(NewMessage)
Catch ex As Exception
Label1.Text = ex.ToString
Label1.Visible = True
End Try
"Tampa .NET Koder" wrote:
Post your mail code. Also, make sure that SMTP relay is configured. You can
check this out: http://www.systemwebmail.com/
"Brian M" wrote:
I forgot to mention, SMTP is installed, configured, and running. I put a
sample message in the pickup folder and it was delivered. This leads me to
believe the problem is with the ability to create a mail message from the
system.web.mail.mailmessage class.
"Patrice" wrote:
SMTP service not installed ?
Patrice
--
"Brian M" <Br****@discussions.microsoft.com> a écrit dans le message de
news:AE**********************************@microsof t.com...
> I have an ASP.NET application using .NET Framework 1.1 running on a
Windows
> 2003 server. The application uses SMTP to send emails. This application
was
> moved from an IIS 5 machine where it worked fine. However, now on the IIS
6
> server the email notification does not work. The application is using
> System.Web.Mail.MailMessage. The error and trace is:
> System.IO.FileNotFoundException: The specified module could not be found.
at
> System.RuntimeType.CreateInstanceImpl(Boolean publicOnly) at
> System.Activator.CreateInstance(Type type, Boolean nonPublic) at
> System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
> System.Web.Mail.SmtpMail.Send(MailMessage message)
>