11
SuperGeek
Re: xoops 2.10 stable big mail problem.
  • 2005/7/11 21:36

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


I don't think set_time_limit is going to work. At first it looks good, but the error message you're getting is indicating that there are only certain times you're going to get it to work.

If your server is running IIS (like me), you have an additional problem: near the bottom of the comments athttp://us3.php.net/set_time_limit is the following note:

Quote:

When you are working with IIS, PHP timeout is valid only when it's lower than script timeout defined by IIS.

IIS 5 has a default timeout of 300 seconds. If you need a higher timeout, you also have to change IIS properties. Otherwise, your server will stop your PHP script before it reaches its own timeout.


To answer your question, the file where it cycles through all the selected mail recipients (which in your case will be an array of 12,000 email addresses) is <xoops_root>\modules\system\admin\mailusers\mailusers.php. Around line 157 is where the mailer object's TO array is populated.

for ( $i $mail_start$i $mail_end$i++) {
                
$xoopsMailer->setToUsers($added[$i]);
            }


This won't work for more than just a few users at a time because the script will timeout, unless you are able to get set_time_limit to work. I know it won't work for me, so I'm going to have to modify the class to send the email to one recipient at a time.

- SuperGeek

12
SuperGeek
Re: xoops 2.10 stable big mail problem.
  • 2005/7/11 23:01

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


My problem appears to be solved. I modified <xoops_root>\modules\system\admin\mailusers\mailusers.php to only send mail to 10 users at a time. It was hard-coded to send to a subset of 100 at a time. For me 100 at a time would require me to click the "NEXT" button six times to get the message sent to all 600 of my users. Since my server times out long before 100 are sent I've hard-coded it to send to a subset of 10, so I'll have to press "NEXT" sixty times. It's not pleasant but at least it works! Maybe in the future someone will add some code to skip the "NEXT" button pressing but still have the same "subset" functionality. The prospect of pressing "NEXT" 1200 times for indream to get email to his 12k users sounds unpleasant. Maybe he can change the 10 to 20, 30 or even 50.

Hopefully my code change will help. Please note: The following is not the complete mailusers.php script, just lines 149-160.

.
.
.
        
$added_count count($added);
        
xoops_cp_header();
        
//OpenTable();
        
if ( $added_count ) {
            
$mail_start = !empty($_POST['mail_start']) ? $_POST['mail_start'] : 0;
//            $mail_end = ($added_count > ($mail_start + 100)) ? ($mail_start + 100) : $added_count;
            
$mail_end = ($added_count > ($mail_start 10)) ? ($mail_start 10) : $added_count;
            
$myts =& MyTextSanitizer::getInstance();
            
$xoopsMailer =& getMailer();
            for ( 
$i $mail_start$i $mail_end$i++) {
                
$xoopsMailer->setToUsers($added[$i]);
            }
.
.
.


Instead of hard-coding the 10, 100 or whatever, my opinion is that this should be a XOOPS config option.

- SuperGeek

13
indream
Re: xoops 2.10 stable big mail problem.
  • 2005/7/12 9:24

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


thanks for ideas supergeek

i'm trying to change mailusers.php send user count 100 to 75 not work
75 to 50 :) (240 next click) not work opened a blank page


i'm abondoned sending mail (and maybe my iss and win server maybe xoops)

14
SuperGeek
Re: xoops 2.10 stable big mail problem.
  • 2005/7/12 21:47

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


The dreaded blank page. Turn on debugging and add some echo "step 1<br />"; debug messages to your code (probably in mailusers.php) to see if you can figure out where the problem is. It might be a simple typo. Don't give up yet! It's worth fighting for!

-SG

15
tedsmith
Re: xoops 2.10 stable big mail problem.
  • 2005/8/7 17:33

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


I too am getting the "Could not instantiate mail()" problem when using Liase and XOOPS 2.0.13

I tried the workaround suggested earlier and posted on SourceForge ( view here) but all I got was a blank page, so I had to re-upload the php file from a fresh download of Xoops.

I have also read the post at Brandycoke.com where they say to check that the name fileds are populated etc. They are, so it isn't that that's causing my problem either.

The wierd thing is that I have two sites hosted by the same company and presumebly on the same server. I have XOOPS 2.0.13 on both of them. Using the basic XOOPS 'Contact Us' module, one site works and the other doesn't. So I can't work it out.

I HAVE GOT to get this working!! I'm creating a new site for a 'client' and trying to create a snazzy contacts page. If this doesn't work I'm stuffed! I've tried sendmail and SMTP and they don't work either.

Can anyone provide me with a change that will work?

Thanks

Ted

16
tedsmith
Re: xoops 2.10 stable big mail problem.
  • 2005/8/7 21:02

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


*a despairing bump*

17
indream
Re: xoops 2.10 stable big mail problem.
  • 2005/9/30 11:00

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


my XOOPS 2.0.1.3 running on

Windows NT IQ 5.2 build 3790
PHP Version 4.3.6
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010

i have "send mass mail" and "open mail settings" problem and i cant find solution

18
tedsmith
Re: xoops 2.10 stable big mail problem.
  • 2005/10/1 11:47

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Indream...

Try reading this post :

https://xoops.org/modules/newbb/viewtopic.php?topic_id=39800&forum=28&post_id=174571#forumpost174571

and see if that helps you out. It did me.

Ted

19
indream
Re: xoops 2.10 stable big mail problem.
  • 2005/10/1 16:19

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


thanks ted but this not solution for me

i have 12000 over user and my XOOPS cms not open general seettings > " mail settings "
show time out message or open a blank page everytime.

registration or forgot password or activation mail send function is work !

but send mass mail for my all users not working and show same time out message or blank page.


now i'm try to change phpmail values to smtp mail values in phpmyadmin maybe this work


edit:

i say this my hosting provider
he say i change mail send limit for antispam.


but i cant edit "mail settings" XOOPS shot time out and i think XOOPS 2.0.13.1 select user function wrong.

20
adamfish
Re: xoops 2.10 stable big mail problem.
  • 2007/3/24 23:21

  • adamfish

  • Just popping in

  • Posts: 4

  • Since: 2003/11/9


I was having this problem as well. My issue is that I had two email addresses, separated by a comma listed in the "admin Email" box, which caused the script to crash. When I removed the one it worked just fine. Just thought I'd pass this along.

Adam

Login

Who's Online

220 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 220


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits