473,327 Members | 1,896 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,327 software developers and data experts.

sending an email from a webform?

hello all,
as part of an application im developing with asp.net webforms, i need a
user whos using the application to be able to receive an email
confirmation of a booking they made using the application. how exactly
do you send an email using webforms?

Apr 11 '06 #1
3 1289
Hi,

You can use smtp mail. It is a sample code for doing this at the bottom.

MailMessage email = new MailMessage();

email.To = txtBoxTo.Text;

email.From = txtBoxFrom.Text;

email.Subject = txtBoxSubject.Text;

email.Body = "Mail Body is here";

email.BodyFormat = MailFormat.Html;

smtpMail.SmtpServer = txtServer.Text;
smtpMail.Send(email);

----------------------Sample Code ends-------------------------------

Have a nice work,

Aytaç ÖZAY
Software Engineer

"bazzer" <so*******@yahoo.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
hello all,
as part of an application im developing with asp.net webforms, i need a
user whos using the application to be able to receive an email
confirmation of a booking they made using the application. how exactly
do you send an email using webforms?

Apr 11 '06 #2
thanks Aytac, got it working.

Apr 11 '06 #3
You are asking what's probably the most-often asked FAQ.

Maybe you should spend some time reading the ASP.NET FAQ :

http://asp.net.do/faq/default.aspx

This FAQ will show you how to ask questions in a way
that is likely to get you the answer you want to get : the right answer.

You have to do your part, too, if this is going to work out in such a way that you
*learn* what you need to learn, instead of getting ready-made answers which you
will promptly forget and need to ask for them again.

With that in mind, the first FAQ recommendation is that you use search engines to
find out if the question you intend to ask has been already answered in newsgroups.

Use resources like :

Google Advanced Group Search : http://groups.google.com/advanced_group_search
and
MSN Search : http://search.msn.com/

to search for the text of the problem which is stumping you, and save everybody the
waste of time that asking a FAQ entails. Remember : thousands of programmers will
read your post. Be considerate of their time.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"bazzer" <so*******@yahoo.com> wrote in message
news:11**********************@v46g2000cwv.googlegr oups.com...
hello all,
as part of an application im developing with asp.net webforms, i need a
user whos using the application to be able to receive an email
confirmation of a booking they made using the application. how exactly
do you send an email using webforms?

Apr 11 '06 #4

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

Similar topics

2
by: Marre | last post by:
Hi all! I would like to get data from a webform, push a button and fire up Word. Here i would like to retrieve data from my webform. Is there a way to do this without using chrystal reports? ...
3
by: VB Programmer | last post by:
My company has it's own webserver, which is going to host our ASP.NET web application. We want the website to be able to send out emails. 1. What do I need on the server so that it has the...
1
by: Leszek | last post by:
Hello, A few weeks ago I sent a post about sending encrypted emails. I found out how to encrypt such emails using .NET, but now there is another step: How to receive them? Let's say I have...
2
by: Dee | last post by:
Hi I have added EnableViewStateMac="false" to the sending WebForm's @Page Directive and my sample code has the following line: Dim coll As...
2
by: Steven Bazeley | last post by:
I need to send a large list of emails from a webform by clicking a single button. Microsoft's documentation for coding this seems straight forward and I'm about to begin experimenting with their...
5
by: Mark A. Sam | last post by:
Hello, I am sending two emails from the same procedure, one to myself (while testing) and another (a comfirmation) to the user on the website. I was having difficulty finding a relay server to...
5
by: Jai | last post by:
Hi, I am in a problem of sending mass emails(newsletter) to my website members. Actually my problem is this: I want to send newsletter to my website members. But I had given a facility for...
5
by: =?Utf-8?B?VG9ueSBXaXNzbGVy?= | last post by:
Hello everyone- I am hoping a couple of you will have some ideas on this one... I have a webform created in visual basic 2005. Basically, the webform gather answers to the questions asked on...
0
by: sheel331 | last post by:
Hello, I am new to coding in vb.net and have run into an issue with some code that I am looking over. This is a webform that is filled out and once it is filled out, it takes the responses from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.