0

I want to know how can I create mail alert using jQuery mobile (javascript, html5). This alert consists of alerting the user when a new announcement is added (the announcement will be added in the base of joomla, I have a site joomla synchronised with an application phonegap, in the application the customer will do a search of property, if is not exist, he can save her research, and when a new announcement posted he can receive an alert mail about this add)

Please help me

4

1 に答える 1

0

You need to have a monitoring system in place on your sever to find when an announcement is posted (I assume you have PHP or similar already handling this part).

Once you have that in place, you need to use Server-Side Code to send an email. It would be a rather large spam issue if anyone could send emails from Javascript.

PHP has the following function available to you:

mail($to, $subject, $message, $headers);

You must use From: me@example.com in your header, and separate header attributes by \r\n.

-

The monitoring system:

You say you have the JEA Joomla extension, which is used to post announcements. I assume that it has a PHP file to handle the addition of new announcements.

Simply add your function at the bottom of that PHP page, and what should happen is that when the PHP file is called to add a new announcement, your function will also be called, and the users will be automatically notified.

于 2012-06-11T12:59:23.527 に答える