I have a need for a simple html + javascript page that must send multiple emails to a predefined list of users upon a button click.
I need the html page to be able to run locally on a machine that does not have a web server installed.
If it was just the html page by itself, this would be no problem. But from everything I’ve read, it is not possible to send emails directly from javascript/jquery (see this StackOverflow post here for example). Instead, I have to call some kind of script to actually send the emails.
I also looked at this post, but this one seems to be about running a self contained script, not invoking a method with parameters. I’m not sure that this is what I need.
I am looking for a way to send the emails without requiring that a web server be running on the machine. It doesn’t have to be PHP. Is there any simple way I can do this without requiring a web server to exist on the machine?
To answer your question: no, there is no way to run server-side code (which sending an email must be) without having a server to run that code – PHP, Python, Ruby or anything else.
You could look at using a third-party service like http://postageapp.com/ – but be aware that there’ll be costs involved, and you’ll have to route the content of those emails through that third-party service.