Jump to content
MailBeez

Automatic Trigger Email Campaigns with MailBeez Modules

Recommended Posts

Your contribution sounds great and I have downloaded all the files and then tried following the instructions for modyfying existing files and I am afriad I strat to get error messages! Even if I get rid of the error message the link still does not appear in the tools box in admin. I have noticed however what appears to be discrepancies to me but I am very new to scripting and coding.

 

For example there is an instruction to find array( 'code' => FILENAME_WHOS_ONLINE, etc etc and add // mailbeez,array( 'code' => 'mailbeez.php', 'title' => 'MailBeez', 'link' => tep_href_link('mailbeez.php'))// the coding you are told to find is based on FILENAMES and the coding you are asked to add are not in the same format.

 

Please help so I can get the benefit of this contribution.

hi liz,

 

just replied to your message.

 

cheers

cord

Share this post


Link to post
Share on other sites

Multilanguage Template Manager

Sounds easy, but is actually a complete subsystem:
This new add-on makes MailBeez multilingual and also gives you an editor frontend for editing the templates from the admin interface.


cheers
cord

Edited by burt
remove link

Share this post


Link to post
Share on other sites

Does this mean we should add this even if we are not using multilingual but want to alter templates from admin?


Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Share this post


Link to post
Share on other sites

Sounds interesting all depends on cost and funds available at the time.


Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Share this post


Link to post
Share on other sites

Your file looks fine, I don't see a problem. You should be able to send out email everyone in your subscribers list with a value of '2' in the field subscribers.customer_newsletter .

 

Note that no attempt has been made to test the bulkmail module with the cron jobs.

 

Perhaps I don't understand what problem you are having, try restating exactly what the issue is.

 

 

I got the same problem with the module bulkmail once i send an email to all my customers and a few weeks later i will change the name of the newsletter with a different content and try to send another fresh newsletter its not resetting and in my list list recipiens i have no customer can you please tell me if someone had fixed this problem . Regards - walter

Share this post


Link to post
Share on other sites

Hello,

 

Yes i run it once before.

 

Can the problem be in this part:

				// early check to avoid processing when email was already sent
			$chk_result = $mb_chk->check($this->module, $this->iteration, $item['subscribers_id']);
			if ($chk_result != false) {
				// this iteration for this customer was already sent -> skip
				//this means if for this customer he has 2011 in mailbeez_tracking then skip him

					continue;

				}

 

i dont know how i can send a new mail.

I know it is not an option to send the newsletter 2 a day (i use cron job to run mailbeez 2 a day for review's)

The newsletter may not do that so i tought i run once and turn off.

 

Is that right or not?

 

because i cant find a manual for bulkmail.

 

Here is the complete bulkmail.php

<?php
/* 
 BULKMAIL MODULE by www.niora.com
 MailBeez Automatic Trigger Email Campaigns
 http://www.mailbeez.com
 Copyright (c) 2010 MailBeez
inspired and in parts based on
 Copyright (c) 2003 osCommerce
 Released under the GNU General Public License
*/
// make path work from admin

 require_once(DIR_FS_CATALOG . 'mailhive/common/classes/mailbeez.php');	
// could be in language-file
// just easier to define it in the mailbee

define('MAILBEEZ_BULKMAIL_TEXT_TITLE', 'Bulkmail Sender');
define('MAILBEEZ_BULKMAIL_TEXT_DESCRIPTION', 'This MailBeez Module sends the customer mailing list at a controlled rate.');	

 class bulkmail extends mailbeez {
	// class constructor

   function bulkmail() {
		// call constructor
		mailbeez::mailbeez(); 

		// set some stuff:	
     		$this->code = 'bulkmail';
		$this->module = 'bulkmail';
		$this->version = '1.4'; // float value
		$this->required_mb_version = 1.4; // required mailbeez version
		$this->iteration = '50'; // value not likely to be used in customers.customers_newletters 
     		$this->title = MAILBEEZ_BULKMAIL_TEXT_TITLE;
     		$this->description = MAILBEEZ_BULKMAIL_TEXT_DESCRIPTION;
     		$this->mailrate = MAILBEEZ_BULKMAIL_RATE;
     		$this->newsletter = MAILBEEZ_BULKMAIL_NEWSLETTER;
     		$this->sort_order = MAILBEEZ_BULKMAIL_SORT_ORDER;
     		$this->enabled = ((MAILBEEZ_BULKMAIL_STATUS == 'True') ? true : false);
		$this->googleanalytics_enabled = ((MAILBEEZ_BULKMAIL_GA == 'True') ? 'True' : 'False');
		$this->googleanalytics_rewrite_mode =  ((MAILBEEZ_BULKMAIL_GA_MODE == 'default') ? MAILBEEZ_MAILHIVE_GA_REWRITE_MODE : MAILBEEZ_BIRTHDAY_GA_MODE);
		$this->sender = MAILBEEZ_BULKMAIL_SENDER;
		$this->sender_name = MAILBEEZ_BULKMAIL_SENDER_NAME;
		$this->status_key = 'MAILBEEZ_BULKMAIL_STATUS';			
		$this->documentation_key = $this->module; // leave empty if no documentation available

		// $this->documentation_root = 'http:://yoursite.com/' // modify documentation root if necessary
		//short name of letter to use
		$newsletter = $this->newsletter;
		$this->htmlBodyTemplateResource = $newsletter.'.html-alternative.html'; // located in folder of this module
		$this->txtBodyTemplateResource = $newsletter.'.text-alternative.html'; // located in folder of this module			
		$this->subjectTemplateResource = $newsletter.'.subject-htmlandtext.html'; // located in folder of this module

		$this->audience = array();
		$this->additionalFields = array('subscribers_id' => '007','date_of_birth' => '31.01.'); // list of additional fields to show in listing with testvalues

		// list of additional fields to show in listing with testvalues used for Test-Mail    
}

// class methods
	function getAudience() {

     $query_raw = "select s.subscribers_firstname, s.subscribers_lastname, s.subscribers_id, s.subscribers_email_address
				from " . TABLE_SUBSCRIBERS . " s where s.customers_newsletter = " . MAILBEEZ_BULKMAIL_CUSTOMERS . " ";		
	$query = mh_db_query($query_raw);

		// for early check
		$mb_chk = new mailbeez_mailer($this);						
		//start loop
		while ($item = mh_db_fetch_array($query)) {
		// mandatory fields:
		// - firstname
		// - lastname
		// - email_address
		// - customers-id -> block

		// other keys are replaced while sending: $<key>

			// early check to avoid processing when email was already sent
			$chk_result = $mb_chk->check($this->module, $this->iteration, $item['subscribers_id']);
			if ($chk_result != false) {
				// this iteration for this customer was already sent -> skip
				//this means if for this customer he has 2011 in mailbeez_tracking then skip him

					continue;

				}

		$this->audience[$item['subscribers_id']] = array('firstname' => $item['subscribers_firstname'],
															'lastname' => $item['subscribers_lastname'],
		                                                    'email_address' => $item['subscribers_email_address'],
															'subscribers_id' => $item['subscribers_id']
																	);

		$mailrate = $this->mailrate;             		

			// if mode ='production' and 'run' is selected
			if (preg_match('/run&module=bulkmail$/i', $_SERVER['QUERY_STRING'])&& MAILBEEZ_MAILHIVE_MODE == 'production') {
				//count how many emails to send
					$count_mail="SELECT customers_newsletter, COUNT(subscribers_email_address) FROM subscribers  WHERE customers_newsletter=" . MAILBEEZ_BULKMAIL_CUSTOMERS . " GROUP BY customers_newsletter";
   					$countmail=mh_db_query($count_mail);
   					while($rowmail = mh_db_fetch_array($countmail)){
   					$mail=$rowmail['COUNT(subscribers_email_address)'];
   					}

   				//count how many emails have been sent
					$count_mailed="SELECT iteration, COUNT(iteration) FROM mailbeez_tracking  WHERE iteration='50' GROUP BY iteration";
   					$countmailed=mh_db_query($count_mailed);
   					while($rowmailed = mh_db_fetch_array($countmailed)){
   					$mailed=$rowmailed['COUNT(iteration)'];
   					}

   					echo '<blockquote>emails total: '.$mail.'<br>';
   					echo ' emails sent: '.$mailed.'</blockquote>';	

					//since mode is production refresh page to restart loop and select next record to email					
					echo "<meta http-equiv='refresh' content= $mailrate>"; 			
					return $this->audience;								
				}

		  }  // end of loop
		  		// mailing completed
		 		if (preg_match('/run&module=bulkmail$/i', $_SERVER['QUERY_STRING'])&& MAILBEEZ_MAILHIVE_MODE == 'production') {			
				tep_db_query("DELETE FROM mailbeez_tracking  WHERE  mailbeez_tracking.iteration = '50'");
				echo '<h1>mailing complete</h1>';

				}	    

				//simulate mode list all
				if (MAILBEEZ_MAILHIVE_MODE == 'simulate') {  

				//count how many emails to send
					$count_mail="SELECT customers_newsletter, COUNT(subscribers_email_address) FROM subscribers  WHERE customers_newsletter=" . MAILBEEZ_BULKMAIL_CUSTOMERS . " GROUP BY customers_newsletter";
   					$countmail=mh_db_query($count_mail);
   					while($rowmail = mh_db_fetch_array($countmail)){
   					$mail=$rowmail['COUNT(subscribers_email_address)'];
   					}
   					echo '<blockquote>emails total: '.$mail.'</blockquote>';						
					return $this->audience;						
					}					
		}			

	// installation methods

   function keys() {
     return array('MAILBEEZ_BULKMAIL_STATUS', 'MAILBEEZ_BULKMAIL_CUSTOMERS', 'MAILBEEZ_BULKMAIL_NEWSLETTER', 'MAILBEEZ_BULKMAIL_RATE', 'MAILBEEZ_BULKMAIL_SENDER', 'MAILBEEZ_BULKMAIL_SENDER_NAME', 'MAILBEEZ_BULKMAIL_SORT_ORDER', 'MAILBEEZ_BULKMAIL_GA', 'MAILBEEZ_BULKMAIL_GA_MODE');
   }

   function install() {
		mh_insert_config_value(array('configuration_title' => 'Send Bulkmail', 
																 'configuration_key' => 'MAILBEEZ_BULKMAIL_STATUS', 
																 'configuration_value' => 'False', 
																 'configuration_description' => 'Do you want to email a customer group?', 
																 'set_function' => 'mh_cfg_select_option(array(\'True\', \'False\'), '
																 ));


		mh_insert_config_value(array('configuration_title' => 'newsletter status', 
																 'configuration_key' => 'MAILBEEZ_BULKMAIL_CUSTOMERS', 
																 'configuration_value' => '2', 
																 'configuration_description' => 'customer group to mail(value in database table customers.customers_newsletter)', 
																 'set_function' => ''
																 ));


		mh_insert_config_value(array('configuration_title' => 'newsletter name', 
																 'configuration_key' => 'MAILBEEZ_BULKMAIL_NEWSLETTER', 
																 'configuration_value' => 'newsletter', 
																 'configuration_description' => 'newsletter to send.(must match first part of file name of a newsletter in mailhive/mailbeez/bulkmail folder)', 
																 'set_function' => ''
																 ));														 


		mh_insert_config_value(array('configuration_title' => 'Set Mailing Speed', 
																 'configuration_key' => 'MAILBEEZ_BULKMAIL_RATE', 
																 'configuration_value' => '4', 
																 'configuration_description' => 'seconds per email', 
																 'set_function' => ''
																 ));


		mh_insert_config_value(array('configuration_title' => 'sender email', 
															 	'configuration_key' => 'MAILBEEZ_BULKMAIL_SENDER', 
																 'configuration_value' => STORE_OWNER_EMAIL_ADDRESS, 
																 'configuration_description' => 'sender email', 
																 'set_function' => ''
																 ));


		mh_insert_config_value(array('configuration_title' => 'sender name', 
																 'configuration_key' => 'MAILBEEZ_BULKMAIL_SENDER_NAME', 
																 'configuration_value' => STORE_NAME, 
																 'configuration_description' => 'sender email', 
																 'set_function' => ''
																 ));


		mh_insert_config_value(array('configuration_title' => 'Sort order of display.', 
																 'configuration_key' => 'MAILBEEZ_BULKMAIL_SORT_ORDER', 
																 'configuration_value' => '20', 
																 'configuration_description' => 'Sort order of display. Lowest is displayed first.', 
																 'set_function' => ''
																 ));


		mh_insert_config_value(array('configuration_title' => 'Google Analytics Integration', 
																 'configuration_key' => 'MAILBEEZ_BULKMAIL_GA', 
																 'configuration_value' => 'True', 
																 'configuration_description' => 'Do you want to enable URL rewrite to track this MailBeez Module in Google Analytics?', 
																 'set_function' => 'mh_cfg_select_option(array(\'True\', \'False\'), '
																 ));


		mh_insert_config_value(array('configuration_title' => 'Google Analytics Integration URL rewrite mode', 
																 'configuration_key' => 'MAILBEEZ_BULKMAIL_GA_MODE', 
																 'configuration_value' => 'default', 
																 'configuration_description' => 'Google Analytics URL Rewrite Mode', 
																 'set_function' => 'mh_cfg_select_option(array(\'default\', \'all\', \'shop\'), '
																 ));
   }
 }
?>

 

Thanks for helping.

 

Jasper

 

 

 

 

 

I got the same problem with the module bulkmail once i send an email to all my customers and a few weeks later i will change the name of the newsletter with a different content and try to send another fresh newsletter its not resetting and in my list list recipiens i have no customer can you please tell me if someone had fixed this problem . Regards - walter

Share this post


Link to post
Share on other sites

I am new to all this but bulk mail would seem a thing people will want to do on a repeated basis so if they can only send one email to a list and then cant send another it will be limiting the use of mailbeez. I have added but not used yet but this seems logical to me to be able to send regular bulk mails on different topics.


Liz

 

A very appreciative member still attempting to climb the steep learning curve!

Share this post


Link to post
Share on other sites

 

is there a need for an official MailBeez Bulkmail module (premium - not free)?

 

 

Yes

 

 

What should be the features?

 

 

One feature I would like to see is a combination of a visitor's table (anonymous customers who want to subscribe to the store's newsletters) to the main set of subscribers.

Share this post


Link to post
Share on other sites

Yes

 

 

 

One feature I would like to see is a combination of a visitor's table (anonymous customers who want to subscribe to the store's newsletters) to the main set of subscribers.

 

 

definitely a need for a bulkmail module features be able to send newsletters to the newsletters subscribers with why not a front end subscriber newsletter box who can be included to the column left /right or footer

Share this post


Link to post
Share on other sites

definitely a need for a bulkmail module features be able to send newsletters to the newsletters subscribers with why not a front end subscriber newsletter box who can be included to the column left /right or footer

 

There is already an addon called simple visitors newsletter. I was thinking of a combination of that with the regular subscribed users.

Share this post


Link to post
Share on other sites

There is already an addon called simple visitors newsletter. I was thinking of a combination of that with the regular subscribed users.

 

 

what simple visitors newsletter does??? and if there is a bulkmail module you can also do a package with Simple Throttling. the bulkmail module unofficial is a good start i think

Share this post


Link to post
Share on other sites

from my point of view I would like to focus on a module for mailbeez as a reliable, controllable engine for sending bulkmails.

 

one idea would be to keep the existing "newsletter manager" admin frontend, but replace the sending function with a mailbeez module - which picks up the newsletter and sends them out.

 

I could be possible to merge other lists (e.g. visitor subscribers) into the customer list of newsletter subscribers.

Share this post


Link to post
Share on other sites

from my point of view I would like to focus on a module for mailbeez as a reliable, controllable engine for sending bulkmails.

 

I believe this exists already in the form of an addon which I am currently using to great effect.

Share this post


Link to post
Share on other sites

from my point of view I would like to focus on a module for mailbeez as a reliable, controllable engine for sending bulkmails.

 

one idea would be to keep the existing "newsletter manager" admin frontend, but replace the sending function with a mailbeez module - which picks up the newsletter and sends them out.

 

I could be possible to merge other lists (e.g. visitor subscribers) into the customer list of newsletter subscribers.

 

yep ok but what about if a new customer sign up it will be nice than automatically it will send the last newsletter as well

Share this post


Link to post
Share on other sites

I believe this exists already in the form of an addon which I am currently using to great effect.

not really - otherwise you wouldn't have the issue with sending out another bulkmail :'(

 

the bulkmailer addon works to some extend, but bypasses the mailbeez framework - and that is causing issues

Share this post


Link to post
Share on other sites

not really - otherwise you wouldn't have the issue with sending out another bulkmail :'(

 

the bulkmailer addon works to some extend, but bypasses the mailbeez framework - and that is causing issues

 

I think bulkmail module is something had to be done it will put mailbeez number one i'am sure

Share this post


Link to post
Share on other sites

New Module: Welcome Email

just a simple module which allows you to send your new customers a welcome email through MailBeez:


gives you all the flexibility and features of MailBeez to e.g. give an introduction into your store with e.g. the latest new products (content module for that is coming soon)

New Module: Trustpilot Integration Suite

This package allows you to display your Trustpilot ratings in your Shopfrontend and also in MailBeez generated emails:


see also examples of www.alwaysriding.co.uk with some nice designs!

cheers
cord

Edited by burt
remove links

Share this post


Link to post
Share on other sites

 

 


New Module: Welcome Email

just a simple module which allows you to send your new customers a welcome email through MailBeez:

gives you all the flexibility and features of MailBeez to e.g. give an introduction into your store with e.g. the latest new products (content module for that is coming soon)

New Module: Trustpilot Integration Suite

This package allows you to display your Trustpilot ratings in your Shopfrontend and also in MailBeez generated emails:

see also examples of www.alwaysriding.co.uk with some nice designs!
cord

Interesting but i still think a bulk email module has to be done...
Regards, Walter


Edited by burt
remove links

Share this post


Link to post
Share on other sites

Hi there!

 

It's me again :)

 

Found another strange thing in Mailbeez.

 

The Facebook review isn't running automaticly.

 

When I look in the module, and list receipients. There are lot's of them in there.

But the cronjob doesn't send out the emails.

 

When I run the mailbeez.php manualy, it all works ok and the emails are all send out...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×