473,706 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email Form in ASP.NET

hiya,

i would like to make a contact form in my website. i've looked all over the
web for instructions but none of them work.

in case you dont know what i mean, i want a form with fields like name,
email address and comment and i want the submitted values to be sent to my
email address.

thanks in advance. by the way, is there a 'chat group' like this for asp.net?
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!
Feb 15 '06 #1
4 1247
Dan
There is a mail object in asp.net which does exactly that, create an
instance of it and look at its methods, really easy to use. Amazed you
couldnt find tutorials for it on the net?

And yes there is, microsoft.publi c.dotnet.framew ork.aspnet .

--
Dan
"Helter Skelter" <He***********@ discussions.mic rosoft.com> wrote in message
news:2F******** *************** ***********@mic rosoft.com...
hiya,

i would like to make a contact form in my website. i've looked all over
the
web for instructions but none of them work.

in case you dont know what i mean, i want a form with fields like name,
email address and comment and i want the submitted values to be sent to my
email address.

thanks in advance. by the way, is there a 'chat group' like this for
asp.net?
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!

Feb 15 '06 #2
hi,

sorry, im no the best csharpist. what sort of object? ive only got
maildefinition, maildefinitionc onverter, maileventargs and mailevent handler
in the intellisense in a script block
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!
"Dan" wrote:
There is a mail object in asp.net which does exactly that, create an
instance of it and look at its methods, really easy to use. Amazed you
couldnt find tutorials for it on the net?

And yes there is, microsoft.publi c.dotnet.framew ork.aspnet .

--
Dan
"Helter Skelter" <He***********@ discussions.mic rosoft.com> wrote in message
news:2F******** *************** ***********@mic rosoft.com...
hiya,

i would like to make a contact form in my website. i've looked all over
the
web for instructions but none of them work.

in case you dont know what i mean, i want a form with fields like name,
email address and comment and i want the submitted values to be sent to my
email address.

thanks in advance. by the way, is there a 'chat group' like this for
asp.net?
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!


Feb 15 '06 #3
i've looked all over
the
web for instructions but none of them work.
you obviously haven't spent time researching the issue. Maybe you should
spend some time looking at the .net mail object on the web.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"Helter Skelter" <He***********@ discussions.mic rosoft.com> wrote in message
news:01******** *************** ***********@mic rosoft.com...
hi,

sorry, im no the best csharpist. what sort of object? ive only got
maildefinition, maildefinitionc onverter, maileventargs and mailevent handler in the intellisense in a script block
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!
"Dan" wrote:
There is a mail object in asp.net which does exactly that, create an
instance of it and look at its methods, really easy to use. Amazed you
couldnt find tutorials for it on the net?

And yes there is, microsoft.publi c.dotnet.framew ork.aspnet .

--
Dan
"Helter Skelter" <He***********@ discussions.mic rosoft.com> wrote in message news:2F******** *************** ***********@mic rosoft.com...
hiya,

i would like to make a contact form in my website. i've looked all

over the
web for instructions but none of them work.

in case you dont know what i mean, i want a form with fields like name, email address and comment and i want the submitted values to be sent to my email address.

thanks in advance. by the way, is there a 'chat group' like this for
asp.net?
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!


Feb 15 '06 #4
Spoon-feeding:

//lib
using System.Web.Mail ;

// snippet
SmtpMail.SmtpSe rver = "smtp.server.of .choice";
MailMessage objEmail = new MailMessage();
objEmail.To = recipientEmailA ddress;
objEmail.From = senderEmailAddr ess;

try
{
// intelli-sense on objEmail for fun and profit
objEmail.Subjec t = subjectLine;
objEmail.Body = emailBody;
objEmail.BodyFo rmat = MailFormat.Html ;
if (!(alAttachment List == null)) // assuming ArrayList
{
foreach (MailAttachment ma in alAttachmentLis t)
{
objEmail.Attach ments.Add(ma);
}
}
SmtpMail.Send(o bjEmail);
}
catch {}
Feb 16 '06 #5

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

Similar topics

6
5399
by: bojanraic | last post by:
Hi! I recently started playing with Python CGI, and I was happy that my basic input-name--print-hello-name CGI form example worked, so I thought I should advance to somew\hat more complicated scripts. I'm trying to write a basic Python email CGI script to send email through HTML email form. I've seen a lot of examples out there, but nothing I tried so far seemed to work. So I would like to know what I am doing wrong.
4
3016
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email User1@here.whatever and User4@here.whatever but if "Loaded" is chosen it needs to email User2@here.whatever and User3@here.whatever, etc, etc... I'm aware that the only thing that really needs to change is the "Mail.AddAddress" line (at least...
88
12509
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
4
2345
by: Ken D. | last post by:
I have an asp page that collects data on referrals. The user inputs the information and selects the rep to receive the referral. My data is being saved to a backend database (SQL) and the user is receiving a confirmation page after hitting the Submit button. Now, what I need is a way to have an email sent to the rep that is selected in the drop down list on the asp form. I have a SQL table containing the reps and corresponding email...
26
2777
by: libsfan01 | last post by:
Hi all! Can anyone show me how to check and email field on a form for the existence of these two characters. Kind regards Marc
2
2484
by: kennykenn | last post by:
Hi, Ive producd code to send an email after capturing info off a form,it works fine locally but when i put it live it doesnt work! the code is stopin at 'msg.send' any ideas, here the code! <%
5
2302
by: simononestop | last post by:
Hi im totally new to perl this is my first go at using it (I normally use asp). I have set up a form with a cgi script from demon hosting. I have edited the script and the form works it sends me an email. however all the information is missing form the email I only get the first form text field?? #!/bin/perl # ------------------------------------------------------------
2
2316
by: sindhudixit | last post by:
Hey, I am having a user fill out a form then the fields are going to uploaded to my database. So, at this point, when the user hits the submit button I want three things to happen: 1. The form uploads to a database (the following code does this) 2. An e-mail is sent to my sales team as well as the customer, which contains the form values . 3. I want the user to then be directed automatically to another webpage, after they hit the...
0
2033
by: gervo | last post by:
I have built a series of email forms in flash MX. using perl. the forms work for some people but not all and I was hoping some one could help me out. Here is the Actionscript on the send button on (release, keyPress "<Enter>") { if (company ne "" and first ne "" and last ne "" and phone ne "" and fax ne "" and mobile ne "" and email ne "" and address ne "" and city ne "" and state ne "" and zip ne "") { i = "0"; validmail = 0;...
4
3476
by: zufie | last post by:
I have a main form containing a command SEND button that prompts an email form to pop up. The email address(es) that are supposed to appear on the email form are those corresponding to the respective agency record appearing on the main form at the current time. Instead, what I get is the email form without the appropriate information in the textboxes of the email form.
0
9285
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9050
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7906
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6614
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5938
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3147
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2500
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2094
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.