473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

About Sending a E-mail message ?

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.
Nov 18 '05 #1
1 1125
CW
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.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: coder_1024 | last post by:
I'm trying to send a packet of binary data to a UDP server. If I send a text string, it works fine. If I attempt to send binary data, it sends a UDP packet with 0 bytes of data (just the...
3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
1
by: Sky | last post by:
Although I've been using C# for the last month or so, and accepting out of blind faith the ViewState, I do have some nagging questions about it... can you help verify the following statements? ...
3
by: Sells, Fred | last post by:
I'm using MSW XP Pro with Python 2.4 to develop but production will be Linux with Python 2.3. (could upgrade to 2.4 if absolutely necessary) I can also switch to Linux for development if...
1
by: Simri | last post by:
Hi All, I'm a very new comer in this site, and I'm very happy to be here. I'd like to ask all of you about delphi programming. I am making a program for "CHATTING" using socket delphi. But the...
0
by: remya1000 | last post by:
by using FTP i can send files to server using vb.net. if the file is big, then it will take some time to complete the sending process to server.or if we were sending 3-4 files to the server one by...
7
by: | last post by:
I have the following program using System; using System.Collections; using System.Net.Sockets; using System.Net; using System.IO; public class Test { public static void Main(string s) {
3
by: asmon | last post by:
I'm a PHP programmer but i'm pretty messed up at this moment with the following script. I have a page with a 'TEXTAREA' and a 'PLAY' text. when i click PLAY, values are being displayed in the...
35
by: RobG | last post by:
Seems developers of mobile applications are pretty much devoted to UA sniffing: <URL: http://wurfl.sourceforge.net/vodafonerant/index.htm > -- Rob
22
by: Neil Gould | last post by:
Or... when is a script not a script? I have several modules for managing different aspects of our club's website, most of which are multi-page. Does setting such things as server.ScriptTimeout...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.