root/trunk/plugins/emailnotify/emailnotify.php @ 183

Revision 183, 1.6 KB (checked in by axel, 9 months ago)

Applied keywords on plugin folder.

  • Property svn:keywords set to Id Date Revision Author HeadURL Id
RevLine 
[143]1<?php
2/**
[183]3* MySMS - Simple SMS Component for Joomla
[143]4*
[183]5* Axel Sauerhoefer < mysms[at]quelloffen.com >
6*
[143]7* http://www.willcodejoomlaforfood.de
8*
[183]9* $Author$
10* $Rev$
11* $HeadURL$
12*
13* $Id$
14*
15* All rights reserved.
16*
17* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
18* MySMS! is free software. This version may have been modified pursuant
[143]19* to the GNU General Public License, and as distributed it includes or
20* is derivative of works licensed under the GNU General Public License or
21* other free or open source software licenses.
[183]22*
23* This program is distributed in the hope that it will be useful,
24* but WITHOUT ANY WARRANTY; without even the implied warranty of
25* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
26*
27**/
[143]28
29// no direct access
30defined( '_JEXEC' ) or die( 'Restricted access' );
31
32$mainframe->registerEvent( 'onSendSms', 'plgMySMSEmailNotify' );
33
34/**
35 * DynDns based authentication plugin
36 */
37class plgMySMSEmailNotify extends JPlugin
38{
39
40        /**
41         * Construct our plugin
42         */
43        function plgMySMSEmailNotify( &$subject, $config )
44        {
45                parent::__construct( $subject, $config );
46        }
47
48        /**
49         * On send sms
50         *
51         */
52        function onSendSms( $message, $from, $to )
53        {
54                $email  = "Sender: $from \r\n";
55                $email .= "Receiver: $to \r\n";
56                $email .= "Message: $message \r\n";
57
58                $plugin = & JPluginHelper::getPlugin('mysms', 'emailnotify');
59
60                //Load plugin params info
61                $pluginParams = new JParameter($plugin->params);
62                $e = $pluginParams->get( 'emailnotify' );
63
64                $success = mail( $e, 'MySMS - EmailNotify', $email );
65
66                return $success;
67        }
68}
69?>
Note: See TracBrowser for help on using the browser.