Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Automatic Trigger Email Campaigns with MailBeez Modules


MailBeez

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

Link to comment
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
Link to comment
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!

Link to comment
Share on other sites

That would be possible, but really an over kill. I am working on a template manager w/o the complex language handling but same editing capabilities - of course at a lower pricetag as well.

 

Would that be of interest?

 

Cheers

Cord

Link to comment
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

Link to comment
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

Link to comment
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!

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

and if there is a bulkmail module you can also do a package with Simple Throttling.

absolutely, the "Simple Throttling" is a generic enhancement of MailBeez, so all modules will automatically make use of that

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

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...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...