Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Just as the title says How to anonymously send an email on button click in html,

I have a shop and when someone clicks the button "buy" i want to get notified on my email, or if there is another way other then email for me to get notified when someone clicks on the button "buy" please share it down below, thank you!

EDIT: Since some of you didnt get what i meant, i will try to clarify:
All i want is a notification, someone clicks, I as admin get "Someone Clicked" notification. Even if im not on the site, anything, email notification, desktop notification, or any other way.

What I have tried:

Tried the ussual ways but thats not what im looking for, i dont want an email cilent to pop up, i DONT want the user to know i recieved an email or that he sent it.
Posted
Updated 12-Aug-17 5:08am
v2
Comments
PIEBALDconsult 12-Aug-17 11:11am    
"Tried the ussual ways"
What are those? What was wrong with them.

If you were using .net, I'd recommend the classes in
System.Net.Mail
Member 13358352 12-Aug-17 11:16am    
by ussual i mean mailto: but thats it, im searching for ways to get this to work, and whats wrong with the "ussal" way is that it pops up an email cilent, which is not what i want.

1 solution

You can't.
Unless you send the email from the Server side - which means it uses your email host, not your customers - you cannot send an email without the user both knowing and confirming that it's ok. Which is exactly as it should be.

Think about it: if you could do it, so could even more malicious sites.
And yes, that means your site would be malicious as well: you are attempting to steal the user email address, or use his address to send messages as if you were him. That is malicious activity however you try to dress it up.
 
Share this answer
 
Comments
Member 13358352 12-Aug-17 10:59am    
Actualy no, my site is a clan's card game pack opening site, my intent is to get notified in any way annonymously that they used the "buy" button, they do not enter any of their data at all

So it doesnt have to be email, anything to just say "someone clicked on the button just now" is good. U got the wrong idea buddy.
OriginalGriff 12-Aug-17 11:21am    
Then just handle the button click event at the server end, like everybody else does...
Member 13358352 12-Aug-17 11:32am    
but how?
OriginalGriff 12-Aug-17 11:39am    
What are you using at the server end? We know it's HTML at the client - and presumably Javascript as well.
Member 13358352 12-Aug-17 11:53am    
html and java is what im using thats it

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