Click here to Skip to main content
15,907,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am jusing Microsoft Visual Studios with aspx and c#.

I have made form:
HTML
<form action="Form()" method="post">
    <fieldset id="fieldset"><legend>Concact me</legend>
    <label for="name">Name:</label>
    <input type="text" name="name" id="txtName" required placeholder="Name" />

    <label for="email">Email:</label>
    <input type="email" name="email" id="txtEmail" required placeholder="email@eksempel.com" />

    <label for="message">Message:</label>
    <textarea name="melding" id="txtMessage" required placeholder="Melding"></textarea>

    <input type="submit" value="Send" />
    <input type="reset" value="Empty" />
    </fieldset>
        </form>


But I have no idea have to send this to my e-mail adress. I have tried to search on internett, but with no good results.

Could someone please help me?
Posted
Comments
DinoRondelly 11-Apr-13 15:10pm    
You are trying to send an email?
raider000 11-Apr-13 15:12pm    
Yes, the form is like an contact form. With, as you can see, three inputs: Name, email and message. I want that when they push the Send-button the mail is delivered to my gmail, but not only the mailto:...
joshrduncan2012 11-Apr-13 15:15pm    
I strongly urge reading the System.Net.Mail documentation. Found here:

http://msdn.microsoft.com/en-us/library/system.net.mail.aspx

 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Apr-13 16:12pm    
Fair enough. Practically, this is the best answer. My 5.
—SA
DinoRondelly 11-Apr-13 16:14pm    
Thanks
Here is an example.[^]

You can build your email with data from a form, but you cannot send an email via HTML.
 
Share this answer
 
Comments
raider000 11-Apr-13 15:19pm    
Thanks. I will look at the example.
No, I know I cant send mail via HTML, thats why i was asking for some good examples in c#, since I havent found anyone I have understood yet.
Sergey Alexandrovich Kryukov 11-Apr-13 16:12pm    
It should be enough, my 5.
—SA
Richard C Bishop 11-Apr-13 16:13pm    
Thank you sir.
Hello,

Have a look at Self Configuring Form Mailer Web Control[^]
Article or Send Email in ASP.Net 2.0 - Feed back Form[^] available here on CodeProject.

Regards,
 
Share this answer
 
Comments
raider000 11-Apr-13 15:17pm    
Ok, thanks for answer. WIll try it out! May take som time before response here, since Im not that good.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900