[BETA] Megamail 0.9.6 (was 'Split MassMail in Chunks 0.9.2')

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
scoobie
Registered User
Posts: 237
Joined: Sun May 12, 2002 6:07 pm

Postby scoobie » Sat May 03, 2003 12:50 pm

I've got a script setup (thanks to netclectic) that adds all new users to a newsletter usergroup and then the user can unsubscribe from that usergroup to stop receiving newsletters.

Something I thought interesting and one which would solve this issue of too many emails to be sent. I have a mass email script.

what it does is sends the email in batches by calling a new page with the DB row number of the batch it is about to send. this avoids the timeout issues and doesn't send bcc cause it is sending to the actual users in batches of say 20 emails at a time.

I've got the script if you would like to try and port it acros to phpbb.
You can have it all if you like... but you can pay for it the rest of your life.

R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Postby R. U. Serious » Sat May 03, 2003 1:24 pm

I thought about that. However I think the process of switching pages is not trvial, or rather is not really ideally solvable with just ServerSide scripting. The script you are using: Is it using meta-refresh to go the next page?

If yes, the problem is, you can only pass get-paramters with refreshes. And that can be "exploited" by someone, if he constructed a link ang to you to click on it...

Such things should only be done via POST, which you would have to be done either manually, or with some sort of javascript, which then would have to somehow get the info from the server wether it can go on to the next page.

The only way I see it working with URL-parameters (i.e. meta-refresh) is if some sort of security was added, like storing all the info about the status of a concrete massmailing in the DB (how much prograss is done, the email body, the recipients etc...). And simply passing an identifier-ID on the calling pages. That way you caould have some sort of jobs, which you could stop in the middle, and continue sending later etc.
However I do not really have the time to do so right now, and I am not sure wether it really is worth it, as the current thing works for me...

I sure do hope there will be a smililar approach to this in the 2.2 version.

R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Postby R. U. Serious » Sat May 03, 2003 10:23 pm

Oh what the heck, I just went ahead and did it. This cost me quite some time. You can "stop" sending anytime inbetween and later continue where you left off. Anyway I think it's self explanatory. Humble as I am I named it:
mega_mail_v096b (downlaod)
(last update 04. May '03)

Any feedback is greatly appreciated...

edit: thanks. fixed. :)
Last edited by R. U. Serious on Sun May 04, 2003 9:31 pm, edited 2 times in total.

Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Postby Antony » Sat May 03, 2003 10:30 pm

Code: Select all

Could not create tables. Are you sure you are using mySQL? Are you sure the table does not already exist?

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near 'email_body TEXT NOT NULL, batch_start MEDIUMINT(8) NOT NULL, batch_size ' at line 6

CREATE TABLE phpbb_megamail( mail_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, mailsession_id VARCHAR(32) NOT NULL, group_id MEDIUMINT(8) NOT NULL, email_subject VARCHAR(60) NOT NULL email_body TEXT NOT NULL, batch_start MEDIUMINT(8) NOT NULL, batch_size SMALLINT UNSIGNED NOT NULL, batch_wait SMALLINT NOT NULL, status SMALLINT NOT NULL, user_id MEDIUMINT(8) NOT NULL )

Line : 71
File : /home/escse/public_html/rapiddr3am/admin/admin_megamail.php
I've Been Banned!

R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Postby R. U. Serious » Sat May 03, 2003 10:39 pm

Wow, that was quick. In line 61 (/admin/admin_megamail.php) add a comma at the end of the line.
email_subject VARCHAR(60) NOT NULL,

I'll update the download link in a few minutes...

Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Postby Antony » Sat May 03, 2003 10:44 pm

I'm always fast. :oops:

My girlfriend is unhappy for a reason. ;)
I've Been Banned!

Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Postby Antony » Sun May 04, 2003 4:41 pm

Have you fixed that yet?
I've Been Banned!

R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Postby R. U. Serious » Sun May 04, 2003 8:44 pm

Antony wrote:Have you fixed that yet?


Like I said, I fixed it yesterday a couple minutes after your post. :D

Tried 2 per batch on my mod-group and it worked fine. :)

(Remember that you will get one email to the board adress with every batch you sent out.

User avatar
scoobie
Registered User
Posts: 237
Joined: Sun May 12, 2002 6:07 pm

Postby scoobie » Sun May 04, 2003 9:04 pm

R. U. Serious wrote:Oh what the heck, I just went ahead and did it. This cost me quite some time. You can "stop" sending anytime inbetween and later continue where you left off. Anyway I think it's self explanatory. Humble as I am I named it:
mega_mail_v096 (downlaod)

Any feedback is greatly appreciated...

edit: thanks. fixed. :)


That is very very good... will give it a try when I got something to say.

Is there any way to change the email headers used in phpBB to allow option of txt or html format of message?

Again, this is some fantastic work!!
You can have it all if you like... but you can pay for it the rest of your life.

User avatar
scoobie
Registered User
Posts: 237
Joined: Sun May 12, 2002 6:07 pm

Postby scoobie » Sun May 04, 2003 9:08 pm

I tried it and I get this message

Code: Select all

Could not find email template file admin_send_newsletter

DEBUG MODE

Line : 94
File : /home/phpBB/public_html/includes/emailer.php
You can have it all if you like... but you can pay for it the rest of your life.

R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Postby R. U. Serious » Sun May 04, 2003 9:29 pm

scoobie wrote:I tried it and I get this message

Code: Select all

Could not find email template file admin_send_newsletter

DEBUG MODE

Line : 94
File : /home/phpBB/public_html/includes/emailer.php



Man, I am sorry, I use my own template and somehow mixed it up when including it in the download.

Please in line 218 in admin/admin_megamail.php replace

Code: Select all

      $emailer->use_template('admin_send_newsletter');

with the regular

Code: Select all

      $emailer->use_template('admin_send_email');


I will update the download in a few minutes. edit: Done.
Last edited by R. U. Serious on Sun May 04, 2003 10:10 pm, edited 1 time in total.

Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Postby Antony » Sun May 04, 2003 9:46 pm

Can you post when you update so people know?
I've Been Banned!

Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Postby Antony » Sun May 04, 2003 9:51 pm

*raises to feet and aplaudes*

Congrats! You did it.

Works perfectly.
I've Been Banned!

Tourmeister
Registered User
Posts: 33
Joined: Thu Mar 13, 2003 5:10 am

Anything special to do to install this mod?

Postby Tourmeister » Fri May 16, 2003 6:00 am

Howdy,

Are there any files that need to be edited, or do you simply copy the three files into their respective directories?

Also, is there anything special that needs to be done to use the Mod or does the forum software just do it automatically?

If this really works for me it will be a great relief. My hosting provider has set the SMTP recipient limit to 50 :-(

Adios,
Scott

R. U. Serious
Registered User
Posts: 830
Joined: Mon Feb 11, 2002 2:07 pm

Postby R. U. Serious » Fri May 16, 2003 6:58 am

Thanks to the modular concept of the Admin CP you only have to copy the files in there. You'll have a new option below Mass Mail which is called Mega Mail. On the first run, it will detect that the table is missing and it will create it (probably only works with mySQL).

So, yes, you don't have to do anything else. :)


Return to “[2.0.x] MODs in Development”

Who is online

Users browsing this forum: No registered users and 4 guests