PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2013-09-01 18:09:39

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Auto Newsletter 1.0

Code:

##
##
##        Mod title:  Auto Newsletter
##
##      Mod version:  1.0
##   Works on PunBB:  1.2.*
##     Release date:  2013-09-01
##           Author:  Koos (pampoen10@yahoo.com)
##  Original Author:  El Bekko (elbekko@gmail.com)
##
##      Description:  Lets you send out newsletters to users that have 
##                    subscribed to it.
##
##   Affected files:  include/email.php
##
##       Affects DB:  New columns in 'users' table:
##                       'newsletter'
##
##            Notes:  Needs PHP 4.3.0 or up
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download here

Offline

 

#2 2013-09-01 18:11:41

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Auto Newsletter 1.0

This mod is based on El Bekko's Newsletter mod found here. I added various features and the ability to preview the newsletter before it is sent.

This mod allows you to send out either HTML or plain text newsletters to subscribed users. You can add a tag when creating the newsletter that allows the user to automatically unsubscribe from the newsletter. You can also specify in a SQL query who exactly should receive the newsletter. Emails are sent in cycles and you can specify the number of emails that should be sent per cycle, and also the delay between cycles.

Offline

 

#3 2013-09-04 11:10:01

lesurfeur
New member
From: France
Registered: 2008-04-09
Posts: 5
Website

Re: Auto Newsletter 1.0

Hi Koos,
I have this error when i click on the plugin :

Fatal error: Call to undefined function mcrypt_encrypt() in C:\wamp\www\fluxbb_1-2-20\plugins\AP_Newsletter.php on line 57

Code:

function koos_encrypt($string)
{
    $key = 'abc';

    return base64_url_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key))));
}

I use the 1.2.20 version of the forum.

Offline

 

#4 2013-09-04 19:39:49

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Auto Newsletter 1.0

You need to enable mcrypt in php.ini. See the following: http://stackoverflow.com/questions/2604 … pt-encrypt

Offline

 

#5 2013-09-06 13:53:20

lesurfeur
New member
From: France
Registered: 2008-04-09
Posts: 5
Website

Re: Auto Newsletter 1.0

Ok, it was that it was not active in Wamp.
Not sure by against all the world can be used on a shared.
It would be good to notify the read-me, right?

Thanks Koos.

PS: Why not use the language file, this would translate plugin easier.

Last edited by lesurfeur (2013-09-06 13:58:14)

Offline

 

#6 2013-09-08 18:27:35

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Auto Newsletter 1.0

lesurfeur wrote:

Not sure by against all the world can be used on a shared.
It would be good to notify the read-me, right?

Can you perhaps rephrase that? I'm not sure what you mean.

lesurfeur wrote:

Why not use the language file, this would translate plugin easier.

Since it's an admin plugin, I don't think I'll create a language file for it.

Offline

 

#7 2013-09-25 15:37:49

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Newsletter 1.0

Hi Koos,

I'm not sure if this is a bug but i encounter this error "error: unable to fetch user info2." around #823 member of my forum (total member is 1475)
here's the error message:

http://s10.postimg.org/k5l9qurwp/Capture.jpg

Offline

 

#8 2013-09-25 22:49:59

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Auto Newsletter 1.0

What did you use as the SQL query?

Offline

 

#9 2013-09-25 23:44:57

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Newsletter 1.0

i use this query SELECT * FROM users WHERE newsletter=1

after the error i've tried to continue the newsletter by issuing this query

SELECT * FROM users WHERE newsletter=1 AND id limit 824,651

the script continue to run until the end without any error. I was thinking that the problem is in the connection, there might be a network glitch which cause a timeout

Offline

 

#10 2013-10-08 23:10:11

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Auto Newsletter 1.0

Maybe it would be better if you send out the newsletter in smaller batches, e.g. 500 emails per batch.  I might add a feature in the next update that will allow you to continue the sending process in case of a server timeout.

Offline

 

#11 2014-02-10 05:08:15

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Newsletter 1.0

Sending in smaller batches work but sometimes I got an error.

Offline

 

#12 2014-02-24 17:15:02

Koos
Administrator
Registered: 2007-01-14
Posts: 524
Website

Re: Auto Newsletter 1.0

What error did you get?

Offline

 

#13 2014-02-26 02:07:07

doki
Member
Registered: 2007-04-30
Posts: 225

Re: Auto Newsletter 1.0

same error as on my  post above.

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.