473,473 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sending Email

57 New Member
Hi Friends,

Friends I am working with Asp.net 2.0 and here i have a registration page, where i have a Email field, when I enter a data in this field (i.e Email Address), and click on submitt button a confirmation mail is send to that Email, wht can i do plz suggest me.

Note for help
"something like we make a new userid in any website is. yahoo or rediffmail, where we have an option to enter ur email address and we got a msg on that email."

Thnx & Regds:-
Jul 18 '07 #1
4 966
dip_developer
648 Recognized Expert Contributor
Hi Friends,

Friends I am working with Asp.net 2.0 and here i have a registration page, where i have a Email field, when I enter a data in this field (i.e Email Address), and click on submitt button a confirmation mail is send to that Email, wht can i do plz suggest me.

Note for help
"something like we make a new userid in any website is. yahoo or rediffmail, where we have an option to enter ur email address and we got a msg on that email."

Thnx & Regds:-
plenty of article there in net...have a look...

sending mail in asp.net 2.0

sending mail through asp.net 2.0
Jul 18 '07 #2
jawaharcsc
4 New Member
Hi,

Sending mail from asp.net page is very simple.
Just import system.net.mail namespace.

Then just use this code in the button click event.

System.Net.Mail.MailMessage objmail = new System.Net.Mail.MailMessage();
objmail.From = new MailAddress("from mail address");
objmail.Subject = "s update";
objmail.IsBodyHtml = true;
objmail.Body = "message content";
objmail.To.Add("fujicsc@gmail.com");
// u can add attachments if u want
//System.Net.Mail.Attachment.CreateAttachmentFromStr ing("path\\imp.txt");
System.Net.Mail.Attachment asm = new Attachment("C:\\\imp.txt");
objmail.Attachments.Add(asm);
SmtpClient smtp = new SmtpClient("smtp.gmail.com");

smtp.Credentials = new
System.Net.NetworkCredential("userid", "pwd");
smtp.Port = 25;
//enter the host
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = false;
smtp.Send(objmail);
smtp = null;
objmail.Dispose();
Jul 18 '07 #3
jawaharcsc
4 New Member
s Console.WriteLine("new string :" + newstr);
Jul 18 '07 #4
Plater
7,872 Recognized Expert Expert
We have an in-house article about it too.
Jul 18 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul Lamonby | last post by:
Hi, I am sending a file from the server as an email attachment. The file is being attached no problem and sending the email, but I get an error when I try to open it saying it is corrupt....
0
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
by: =?Utf-8?B?QWRl?= | last post by:
HI All, I am encountering the following error when I try to send an email through a SMTP server. I believe the problem lies with the authentication part when the network crednetials are used,...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
7
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
31
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.