-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Jigs
Message 1 in Discussion
You can use the System.Web.Mail.MailMessage
and the System.Web.Mail.SmtpMail class to send e-mail in your ASPX pages.
Below is a simple example of using this class to send mail
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Web" %>
<%@ Import
Namespace="System.Web.Mail" %>
<HTML>
<HEAD>
<title>Mail
Test</title>
</HEAD>
<script language="VB" runat="server">
Sub Page_Load(sender As Object, E as
EventArgs)
Try
Dim Mailer As MailMessage
Mailer = New MailMessage()
Mailer.From = " [EMAIL PROTECTED]
"
Mailer.To = [EMAIL PROTECTED]
Mailer.Subject = "Your Order"
Mailer.Body = "Your order was
processed."
Mailer.BodyFormat =
MailFormat.Text
SmtpMail.SmtpServer = " MAil
Server Name or IP"
SmtpMail.Send(Mailer)
Response.Write("Mail sent successfully")
Catch ex As Exception
Response.Write("Your message was not
sent: " + ex.Message)
End Try
End Sub
</script>
<body>
<form
id="mail_test" method="post" runat="server">
</form>
</body>
</HTML>
Regards,
Jignesh Desai
http://www.dotnetJiNi.com
----- Original Message -----
From: "Ajay Goyal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Help me?
> Hi Jignesh,
>
> I am totally new in
.Net field as well as in .Net Pune usergroup. I wanted to have the code
for sending email by using ASP.NET and C#. Will you please help me in the
same?
>
> Thanks in advance.
> ---Ajay
>
>
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]