Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
freerolltourny
New Member
New Member


Joined: Nov 22, 2005
Posts: 5

PostPosted: Thu Jul 06, 2006 9:12 pm Reply with quote

Has anyone ever come up with a newsletter that will send a certain number every so many seconds. I also have a Joomla site they have one called YANC that you can set to do this.

My Host only allows me to send 1000 emails an hour and have over 1800 members that want to receive the newsletter. Or if anyone knows a host that allows unlimited emails without having to goto a dedicated server. At this time the price is to high for that.
 
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9456
Location: Arizona

PostPosted: Thu Jul 06, 2006 11:00 pm Reply with quote

On the newsletter app for Nuke, I have not heard. However, its on my "to do" list for HTML Newsletter as I know this is a big problem. I was thinking of making it configurable around the batch size and the delay. However, the tricky part is to allow for "restart where left off" in case someone accidentally closes the "submit" window and also how to ensure that the admin is the one who submitted it! Need to ensure spammers and hackers don't get ahold of this capability from your site!

Before you ask, I have no ETA on the inclusion of this functionality. Wink

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Thu Jul 06, 2006 11:16 pm Reply with quote

As for the host, check ravens out(I have no clue as to the amount hell allow) and you could check other hosts out here, myself included.

As for montegos issues with the admins, How bout making it send a random number in a cookie, then write the random number to the database, make the cookie NEVER expire, then code part of it to check to see if cookie is there, then compare it to the number in the database and if matched, continue where left off.
as for the continue part...............uhhhhhhhhh.
Laughing

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
montego
PostPosted: Fri Jul 07, 2006 11:03 pm Reply with quote

darklord, I've been thinking of some variation upon that "theme". I would probably want the cookie to expire with the close of the browser to help prevent "highjacking" and other things and somehow allow for some kind of "re-process from ___" type of feature in case someone inadvertantly closes the browser. I would use some kind of encoded(hash) value as well, so it would be difficult to (to impossible) "crack".

Yes, I am a rather paranoid fellow... Laughing
 
Dauthus
Worker
Worker


Joined: Oct 07, 2003
Posts: 211

PostPosted: Fri Jul 07, 2006 11:30 pm Reply with quote

Quote:
Has anyone ever come up with a newsletter that will send a certain number every so many seconds. I also have a Joomla site they have one called YANC that you can set to do this.


crontab?

_________________
Only registered users can see links on this board! Get registered or login!
Vivere disce, cogita mori 
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6793
Location: Ha Noi, Viet Nam

PostPosted: Fri Jul 07, 2006 11:57 pm Reply with quote

I don't think cron would work in this instance. It could be used to fire a script but it wouldn't know where the script had got to the next time it fired.

There is a fairly simple script I used some time ago that allowed a max limit to be set for each 'batch' of emails or newsletters which I used to recommend.
Curse my memory as I'm struggling to remember the name of it grrr.
 
View user's profile Send private message Send e-mail
gregexp
PostPosted: Sat Jul 08, 2006 3:29 am Reply with quote

perhaps sending 2 cookies would be the easiest approach, one to expire with the closing of the browser and the other to be updated with each input put in.
but you would need a way to identify the person is the person who started the function in the first place, expiring the cookie with the drop would make this impossible,

c1...make 1 cookie saying hey I'm here doing this
c2 another , this is how far we gotten.
c3 cookie to die with closing of the browser
c4 who they are

if c4 exist and c3 doesnot
get data from c1
if c1==function
get info from c2
continue from info
if info = continue function, produce popup
else,
do nothing.
 
Guardian2003
PostPosted: Sat Jul 08, 2006 5:19 am Reply with quote

I don't think you could use cookies either. The reason I say that is because the 'sending' of the queued newlsetters/emails (whatever) would need to work autonomously once the 'send' button is pressed and it should require no further user intervention i.e. it should not need the user to go back to a screen for a cookie refresh or need the user to sit with the screen open so that the cookie updating can take place.
 
Guardian2003
PostPosted: Sat Jul 08, 2006 5:22 am Reply with quote

I just remembered the script I used to use was called Dada Mail, Only registered users can see links on this board! Get registered or login! but unfortunately it's a CGI script not PHP.
 
gregexp
PostPosted: Sat Jul 08, 2006 12:00 pm Reply with quote

would it be too bad if the script kept running even when the browser was closed montego or should it stop?

could always put a stop feature in the page.
Only registered users can see links on this board! Get registered or login!

Thats something I stumbled accross while searching for a way to tell the number of requests or connections made to the server.
 
montego
PostPosted: Sun Jul 09, 2006 7:53 am Reply with quote

The process I was thinking through in my head was:

1) Admin submits the mass mail

2) If the number of users is large enough, it pops up a smaller browser "Processing..." type window which also says "Do Not Close".

3) Since PHP scripts will almost always have an execution limit, I was going to build into the server-side scripts and the browser META Refresh OR Javascript to re-submit itself at the appropriate time (I don't want to get into applets or similar interactivity).

4) As long as the admin cookie is found, it should be safe (I think) to just re-submit back to the server to send the next batch.

However, if for some reason the "Processing" browser window gets closed, I will provide a mechanism to "Start where you left off...". I am just struggling a bit because I would hate to make too many SQL calls (to save off the process status) given that some web hosts cap this as well...

D and G: thanks for the references! Always good to see how others are doing things even if its not in PHP. It gets the juices flowing...
 
freerolltourny
PostPosted: Sun Jul 09, 2006 12:26 pm Reply with quote

Ok I found a nice little program that will let you use cron Jobs. Is there a way in the user confrim to add data to other tables in the database. I run a poker forum and 90% of my members have requested the emails. If a member doesnt want to recieve them after the first one is sent the program I found has a unsubscribe link. The other feature it has is bounced message. I do have a lot of those and find it a pain to go in to each member and change the newsletter preference. I have the tables in the same Database as nuke.

The program is called Simple Mailing List and can be found at Only registered users can see links on this board! Get registered or login!

The Usertable is very simple I just dont know who to add them.
address userkey confirmed last_sub_req_date bounce_count

Here is the part of the code I found for when a member selects to sign up using the link they provide. Key is a md5 code.

$query = "INSERT INTO mailinglist_subscribers VALUES ('$email', '$key', '0', '$req_time', '0')";
 
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun Jul 09, 2006 2:52 pm Reply with quote

Well here's a work around that might be of some use to someone. I ran into the same problem with my host -- they have a ridiculously low number of emails that you can send. Even my ISP restricted the number of emails that could be in a bcc to something like 100. To heck with that. So I wrote the following code to generate a list of bcc's.
Code:
<?php


 require_once("../config.php");
    require_once("db.php");
   $cnt = "0";
   $sql = "SELECT user_email FROM ".$prefix."_users";
   echo $sql . '<BR>';
   $result = $db->sql_query($sql);
    $numrows = $db->sql_numrows($result);
    echo 'number of rows in user table = ' . $numrows . '<br>';
   
   while ($row = $db->sql_fetchrow($result)) {
      $cnt++;
      if ($cnt < 490) {      
   $bcc .=  $row['user_email'] . ', '; }
      else {
         $bcc2 .= $row['user_email'] . ', '; }
   } // end of while
   $bcc = trim($bcc,", ");
      $bcc2 = trim($bcc2,", ");
   echo $bcc;
   echo '<br><BR>';
   echo $bcc2;
   
?>

I stuck this in an "adhocs" directory. I modified the standard db.php and put it in adhocs also. The code for that (I use mysql) is:

Code:
<?php


include("mysql.php");
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
if(!$db->db_connect_id) {
    die("<br><br><center><img src=images/logo.gif><br><br><b>There seems to be a problem with the MySQL server, sorry for the inconvenience.<br><br>We should be back shortly.</center></b>");
}

?>


and I just copied the mysql.php over from the db directory.

Then I got a Google email account. They allow up to 500 email addresses in a bcc. As you can see from the code I break the list I generate down at 490. So I echo all the bcc's back to the screen by running my program from the browser and I compose the email in Google and paste the bcc's in. With 900 or so users I have to do two emails but it's still manageable.

Works like a charm.
 
View user's profile Send private message Visit poster's website
freerolltourny
PostPosted: Mon Jul 10, 2006 10:37 am Reply with quote

I can pull the address and send them using a windows program I have now. I would like to make it easier to for them to unsubscribe and track bounced messages. The program I found does that. I would just like to add the information to this table when a member activates a new account.

$query = "INSERT INTO mailinglist_subscribers VALUES ('$email', '$key', '0', '$req_time', '0')";

Then if they don't want to recieve it after the first one is sent the can opt out.
 
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Mon Jul 10, 2006 11:23 am Reply with quote

Necessity is the mother of all invention...

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Trubador
Regular
Regular


Joined: Dec 28, 2004
Posts: 94

PostPosted: Sat May 26, 2007 8:27 am Reply with quote

montego wrote:
On the newsletter app for Nuke, I have not heard. However, its on my "to do" list for HTML Newsletter as I know this is a big problem. I was thinking of making it configurable around the batch size and the delay. However, the tricky part is to allow for "restart where left off" in case someone accidentally closes the "submit" window and also how to ensure that the admin is the one who submitted it! Need to ensure spammers and hackers don't get ahold of this capability from your site!

Before you ask, I have no ETA on the inclusion of this functionality. Wink


Is there any update to the developement of adding a batch send to the newsletter?

I'm having a few nightmares with my own host, max 300 at a time, and I'd hate to see the Html_newsletter go to waste.

Cheers

Trub
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©