Click here to Skip to main content
15,891,743 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to send email when submit button is Clicked.I'd refered to send mail in many ways but the codes are only opens the outlook not sending direct email in HTML

What I have tried:

I tried too many ways but that was not working Pls Anyone can help me?
Posted
Updated 31-Aug-18 20:13pm

Like this[^]?
 
Share this answer
 
Comments
[no name] 1-Sep-18 1:56am    
Thank u Sir
HTML can't do that - it runs on the client, so it has to access client resources in order to send an email. That means that an HTML email request has to use the client email app to generate the email - and if you think about it, that makes a lot of sense, unless you want random websites sending out emails in your name without your knowledge!

The only way to send an email without opening the client email app is to send it from the server, using server email ids and server code. Exactly how you do that will depend on the language you wrote your server side code in: C#, VB, or PHP for example.
A quick google will find you examples of sending emails from the server, if you include your chosen language.
 
Share this answer
 
Comments
[no name] 1-Sep-18 1:56am    
Thank u Sir
OriginalGriff 1-Sep-18 2:07am    
You're welcome!
Quote:
I need to send email when submit button is Clicked.

There is basically 2 solutions:
- On client side: By using a link like <a href="mailto:someone@example.com?Subject=Hello">Send Mail</a>
The link opens a new mail on client side, but sending the mail or not is a client choice, its contain too.
- On server side: Just like in solution 1, you must call some code on server which will do the job.
 
Share this answer
 

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