I assume you are sending emails using your IIS.
Configuration:
You need to make sure SMTP is installed on IIS. You then need to configure
SMTP server from IIS MMC to allow it to relay messages from localhost (or
the application server if your .net app is hosted on an app server). You
need to make sure CDO.dll and CDONTS.DLL are present in the
%winpath/system32% directory (and make sure you register cdonts.dll).
Code Snippet:
Dim MyMailMessage As Mail.MailMessage = New
System.Web.Mail.MailMessage()
With MyMailMessage
.From = FromAddress
.To = EmailAddress
.Subject = "Your order has been received."
.Body = "Dear Customer" & vbCrLf & vbCrLf
.Body = .Body & "Your order has been received and
entered into our web ordering system. You can view details of your order at
"
.Body = .Body & OrderURL & vbCrLf & vbCrLf & "Thank you
for your order" & vbCrLf
.Body = .Body &
System.Configuration.ConfigurationSettings.AppSett ings("ManagementName") &
vbCrLf
End With
System.Web.Mail.SmtpMail.SmtpServer =
System.Configuration.ConfigurationSettings.AppSett ings("SMTPServerAddress")
System.Web.Mail.SmtpMail.Send(MyMailMessage)
HTH
"Daniel" <an*******@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com...
Before writing a code to send a mail using asp.net, what steps have to be
taken ? Like do some configuration ??
coz i'm new to .Net.
your help will be appreciated..
Daniel.