Newsletter Subscriber Notification
7 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 31, 2013 (RSS)
By Toledoh - May 3, 2013
Hi Guys,
Is there a way that I can get an email alert to go to an email when a new subscriber is added to the subscriber table?
Tim (toledoh.com.au)
By ross99 - May 3, 2013
Hi Tim
Thanks for posting!
Just to make sure I am on the right track here, what you are looking for is an email to be sent to your site admins each time someone subscribes?
Let me know and we'll look into it together. Thanks!
http://www.interactivetools.com
consulting@interactivetools.com
By Toledoh - May 3, 2013
That's right Ross - or a hard coded email address...
I was thinking that I could add to line 740 of the newsletterBuilder.php
$to = $subscriber['email'];
Tim (toledoh.com.au)
By gregThomas - May 31, 2013
Hi Tim,
Sorry for the delay in reply.
You're along the right line. You could add a sendMessage function line like this on line 740:
global $SETTINGS;
$sendArray = array(
'to' => $SETTINGS['adminEmail'],
'from' => $SETTINGS['adminEmail'],
'subject' => 'A New user has subscribed to the news letter ('.htmlencode($to).')',
'html' => 'Hi<br> A new user has subscribed to the news letter with the e-mail address '.htmlencode($to).' They have been added to the database. <br><br>Thanks<br><br>Site Admin'
);
sendMessage($sendArray);
You should just be able to copy and paste this code directly into the plugin.
So this function creates an array structured for a sendMessage function, then passes it into the sendMessage function.
Let me know if you have any questions
Thanks
Greg
PHP Programmer - interactivetools.com