1
indream
xoops 2.10 stable big mail problem.
  • 2005/5/31 11:36

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


i'm use a XOOPS 2.10 stable.
my website is not send mail for 3 - 4 days and show this error

Could not instantiate mail()


i'm not change anything and i'm searching xoops.org forums this subject... not solution...

any ideas ?

2
giba
Re: xoops 2.10 stable big mail problem.
  • 2005/5/31 11:46

  • giba

  • Just can't stay away

  • Posts: 638

  • Since: 2003/4/26


Contact your support webserver.
In very case is problem of server

Sorry my bad english.

3
indream
Re: xoops 2.10 stable big mail problem.
  • 2005/5/31 12:12

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


i'm contact my webhoster but he say a not problem and nothing changed 1-2 week
and i try this code
<?php
$to 
"xxxx@domain.tld";
$subj "mytest";
$mess "This is foo";
$headers "pseudo@otherdomain.tld";
$mailsend mail($to,$subj,$mess,$headers);
?>

for send mail and test
this work.

i think this problem a xoops' problem...

of i'm eating XOOPS 2.10 stable but i cant see phpmail problem...

i need a help but i dunno where is problem.

4
SuperGeek
Re: xoops 2.10 stable big mail problem.
  • 2005/7/6 21:06

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


Does your XOOPS email work now?

I too am having the "Could not instantiate mail()" problem.

I'm using XOOPS version 2.0.13

Your test code (from 2005/5/31) works for me too, so something must be wrong with Xoops.

I cannot get SMTP or SMTPAuth to work either.

sendmail says it sends the message but I do not receive it.

I'm going to try to debug the code but I've been through this before with no luck. Does anyone have any suggestions?

Thanks!

SuperGeek

5
indream
Re: xoops 2.10 stable big mail problem.
  • 2005/7/7 18:13

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


i'm changed my XOOPS version to XOOPS 2.0.13 but this mass mail function not work...

6
SuperGeek
Re: xoops 2.10 stable big mail problem.
  • 2005/7/10 17:50

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


My debugging efforts have resulted in a work-around for the "Could not instantiate mail()" error raised by <xoops_root>\class\mail\phpmailer\class.phpmailer.php

This appears to be a problem with the value of the $header variable in the class. My work-around is to simply set the value of $header to "". I believe a better solution to the problem is required but it is beyond my current expertise.

Here is my workaround:

/**
     * Sends mail using the PHP mail() function.  Returns bool.
     * @access private
     * @return bool
     */
    
function mail_send($header$body) {
        
//$to = substr($this->addr_append("To", $this->to), 4, -2);

        // Cannot add Bcc's to the $to
        
$to $this->to[0][0]; // no extra comma
        
for($i 1$i count($this->to); $i++)
            
$to .= sprintf(",%s"$this->to[$i][0]);

        if (
$this->Sender != "" && PHP_VERSION >= "4.0")
        {
            
$old_from ini_get("sendmail_from");
            
ini_set("sendmail_from"$this->Sender);
        }
$header="";  ////// This is my work-around
        
if ($this->Sender != "" && PHP_VERSION >= "4.0.5")
        {
            
// The fifth parameter to mail is only available in PHP >= 4.0.5
            
$params sprintf("-oi -f %s"$this->Sender);
            
$rt mail($to$this->encode_header($this->Subject), $body$header$params);
        }
        else
        {
            
$rt mail($to$this->encode_header($this->Subject), $body$header);
        }

        if (isset(
$old_from))
            
ini_set("sendmail_from"$old_from);

        if(!
$rt)
        {
            
$this->error_handler("Could not instantiate mail()");
            return 
false;
        }

        return 
true;
    }



I've submitted this as a bug in the XOOPS Bug Tracker at SourceForge. See https://sourceforge.net/tracker/index. ... roup_id=41586&atid=430840 for details.

I hope others find this helpful!

-SuperGeek

7
indream
Re: xoops 2.10 stable big mail problem.
  • 2005/7/10 18:27

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


when i enter general settings / mail options
opened a blank page, if phpdebug on XOOPS show time out error

and when i enter system/send mail users,
if selected group 1 or 10 user XOOPS send mail.
but selected group is over 10 - 20 over user
xoops show same time out error...


this big big problem for me

i have a 12k users on my webpage :(
and i can't send mass mail to users...

8
jdseymour
Re: xoops 2.10 stable big mail problem.

See this 3RD Party Forum Thread it seems that it is a problem with the phpmailer function not being able to locate the SMTP server. It seems that the settings for this are in PHP.ini somewhere. So if your site is hosted they should check your configuration.

9
SuperGeek
Re: xoops 2.10 stable big mail problem.
  • 2005/7/11 14:17

  • SuperGeek

  • Just popping in

  • Posts: 16

  • Since: 2005/1/12


I'm not sure the part about not being able to find the SMTP server is correct, but the part about php.ini is. In php.ini the timeout setting by default is only 30 seconds. That is not nearly enough time to send email to my 600 users, much less 12,000.

The problem is that the script that does the looping to send email to all the selected users does so in a single execution of the script. If it's not done in 30 seconds (or whatever your php.ini says) it fails. Even worse, you won't know who actually got the email and who didn't.

Another problem: If you use shared/virtual hosting for your website (most do) you'll have a hard time convincing the system admin to change the default timeout period to much more than 30 seconds. The reason is because the php.ini applies to ALL the hosted accounts, not just yours. A few runaway scrips would cripple their server.

The only solution is to rewrite Xoops' email script, so that it sends a few emails and then calls itself, looping until all emails have been sent. Each time it calls itself it sends a few more emails, with a new 30 second timeout period within which to do so. Somehow it would have to keep track of who has already received the email and who has not.

Unless there is an existing solution I'm going to have to do this for my own websites. Has anyone else discovered a solution to this timeout issue?

-SuperGeek

10
indream
Re: xoops 2.10 stable big mail problem.
  • 2005/7/11 16:46

  • indream

  • Not too shy to talk

  • Posts: 170

  • Since: 2004/9/21


i think paste this code
set_time_limit(500);
for time out errors but which file ?

and this a error message.
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

Login

Who's Online

71 user(s) are online (43 user(s) are browsing Support Forums)


Members: 0


Guests: 71


more...

Donat-O-Meter

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

Latest GitHub Commits