Client side script email notification

Go To StackoverFlow.com

0

I have a web form that uses if statements to create a string of emails addresses to notify once the form is submitted. Is it possible to send an email notification to all of the email addresses without using server side code. Only using client side, ex: JavaScript, JQuery?

This will be used on a SharePoint 2003 site with email alerts and server side code disabled.

2012-04-04 20:33
by Jonathan Eckman
We're actually using a javascript contact form utilizing the $ajax option. I'm sure if you google jQuery contact forms you can find something easily enough - Christopher Marshall 2012-04-04 20:35


5

There is no reliable way to send emails from the client-side in any client browser. The mailto: tag exists, but is only supported in some circumstances and requires cooperation with a local email client which is often not present or not configured properly. With the proliferation of web-based email, there may not even be a locally configured email client.

The only reliable way to send those emails is by giving the email addresses to a server and letting the server send out the emails. If you don't want to do that with your own server or can't, then there are services that can do that for you using client-side forms that submit to their server which then sends the email. One such service is Wufoo. It has both a free and paid version.

2012-04-04 20:36
by jfriend00
Your answer just gave me an idea that may be the solution. I could us js to attach mailto:theStringOfEmails to a "Send Alerts" button. This would open the users Outlook with the to and cc line automatically filled out. Not 100% automated but sounds like its as close as Ill get - Jonathan Eckman 2012-04-04 20:54
@JonathanEckman - you can go with mailto:, but it will not work in lots of computers. It is not the reliable way to solve the problem - jfriend00 2012-04-04 20:58
Since I am using mailto: on a companies Intranet where I know that all the users will have Outlook set as their default email client I think it should work - Jonathan Eckman 2012-04-04 23:44


1

Looks like this guy set up a web service and used jQuery to call it to send an email. Not sure if that breaks your constraint or not.

http://riderdesign.com/articles/Sending-email-with-jQuery-and-a-Web-Service.aspx

2012-04-04 20:39
by Christopher Rathermel
Ads