Welcome to Geeklog Thursday, April 22 2021 @ 10:56 am EDT

Geeklog Forums

mail not working -- please help


Stolidus

Anonymous
confused
I receive the error message below when trying to send mail to users. Can someone point me in the right direction.

Thank you in advance.



An error has occurred:
2 - require_once(Mail/RFC822.php) [function.require-once]: failed to open stream: No such file or directory @ C:\public_html\lib-common.php line 2864

array(1) {
["email"]=>
string(16) "xxxxxx@xmail.com"
}

(This text is only displayed to users in the group 'Root'Wink

 Quote

ironmax

Anonymous
Did you do a search? This might help.
 Quote

stolidus

Anonymous
Thank you ironmax.

I had read that bit and tried changing the true - false setting and defining the path to pear, but it did not help me, still received the error message.

Then after searching more through the forums I noticed Dirk sending people to a PHP manual to resolve the issue on their own. So...I am researching a bit. Thanks again.

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Actually, it's the issue with non-case sensitive filesystems, as discussed here.

bye, Dirk
 Quote

ironmax

Anonymous
Quote by: Dirk

Actually, it's the issue with non-case sensitive filesystems, as discussed here.

bye, Dirk



Thanks Dirk...I had forgot about this thread being here that I had created back in May. stolidus, give it a try and see if it fixes your problem. Most likely it will.

Michael
 Quote

stolidus

Anonymous
thoughtful
PHP Formatted Code
// +---------------------------------------------------------------------------+
// | PEAR Settings                                                             |
// |                                                                           |
// | Geeklog uses PEAR to send emails (see "Email Settings" below). Here you   |
// | can tell Geeklog whether to use the PEAR packages installed on your       |
// | server or to use the included packages.                                   |
// +---------------------------------------------------------------------------+

// If your server is running PHP 4.3.0 (or newer) then chances are that PEAR
// is already installed and you can change this to: $_CONF['have_pear'] = true;
$_CONF['have_pear'] = false;

// Geeklog comes with the necessary PEAR packages and will pick them up from
// the following directory if $_CONF['have_pear'] = false (above).
$_CONF['path_pear'] = $_CONF['path_system'] . 'C:/geeklog/system/pear/';

// +---------------------------------------------------------------------------+
// | Email Settings                                                            |
// |                                                                           |
// | Configure how Geeklog sends email: Via PHP's mail() function, sendmail,   |
// | or via an SMTP server.                                                    |
// +---------------------------------------------------------------------------+

// To send email from Geeklog, you will need to select one of the following
// email backends:
// - 'mail', i.e. use PHP's built-in mail() function
// - 'sendmail', i.e. use the sendmail utility
// - 'smtp', i.e. talk directly to your SMTP server
// The default is 'mail' and will work in most environments.

$_CONF['mail_settings'] = array (
    'backend' => 'mail', // can be one of 'mail', 'sendmail', 'smtp'

    // sendmail parameters (only needed for 'backend' => 'sendmail')
    //'sendmail_path' => '/usr/bin/sendmail',
    //'sendmail_args' => '',

    // SMTP parameters (only needed for 'backend' => 'smtp')
    //'host'     => 'smtp.gmail.com',
    //'port'     => '25',
    //'auth'     => false,
    //'username' => '',
    //'password' => ''
);

 


This is how my config is setup. Ok? Confused:

I followed your instructions and rechecked several times every step. still receiving the following error when checking for valid e-mail addy:

An error has occurred:
2 - require_once(Mail/RFC822.php) [function.require-once]: failed to open stream: No such file or directory @ C:\public_html\lib-common.php line 2864

array(1) {
["email"]=>
string(16) "xxxxxx@gmail.com"
}

(This text is only displayed to users in the group 'Root'Wink


The lines from libcommon are:

PHP Formatted Code
/**
* Checks to see if email address is valid.
*
* This function checks to see if an email address is in the correct from.
*
* @param    string    $email   Email address to verify
* @return   boolean            True if valid otherwise false
*
*/

function COM_isEmail( $email )
{
    require_once( 'Mail/RFC822.php' );

    $rfc822 = new Mail_RFC822;

    return( $rfc822->isValidInetAddress( $email ) ? true : false );
}
 


Thanks for the help!
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 08/02/04
Posts: 393
Location:Texas
You didn't need to change the path_pear line in your config.php, put it back to this:

PHP Formatted Code

$_CONF['path_pear'] = $_CONF['path_system'] . 'pear/';
 


and you should be in business.

Thanks!
Mark
 Quote

stolidus

Anonymous
embarrassed
Thanks Mark!

At least I'm getting a different error message now!

An error has occurred:
2 - mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() @ C:\geeklog\system\pear\Mail\mail.php line 125

array(7) {
["recipients"]=>
string(33) "<xxxxxx@xxx.com>"
["headers"]=>
array(4) {
["From"]=>
string(25) "xxxxxx <xxxxxx@gmail.com>"
["Date"]=>
string(31) "Tue, 02 Oct 2007 15:10:06 -0700"
["Content-Type"]=>
string(30) "text/plain; charset=iso-8859-1"
["X-Mailer"]=>
string(13) "GeekLog 1.4.1"
}
["body"]=>
string(4) "test"
["subject"]=>
string(4) "test"
["headerElements"]=>
array(2) {
[0]=>
string(16) "xxxxxx@gmail.com"
[1]=>
string(141) "From: xxxxxx <xxxxxx@gmail.com>
Date: Tue, 02 Oct 2007 15:10:06 -0700
Content-Type: text/plain; charset=iso-8859-1
X-Mailer: GeekLog 1.4.1"
}
["php_errormsg"]=>
string(107) "Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context"
["text_headers"]=>
string(141) "From: xxxxxx <xxxxxx@gmail.com>
Date: Tue, 02 Oct 2007 15:10:06 -0700
Content-Type: text/plain; charset=iso-8859-1
X-Mailer: GeekLog 1.4.1"
}

(This text is only displayed to users in the group 'Root'Wink


I think I have more work to do?
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 08/02/04
Posts: 393
Location:Texas
My guess is you are running on a Windows box based on the paths you showed previously. I doubt you have a mail server running on it so that explains why you get the failed to connect message.

On that box, if you were going to configure a mail client to send email, what would you use for your outgoing server? That is what you want to put in the Geeklog config.php as well in these options.

PHP Formatted Code

$_CONF['mail_settings'] = array (
    'backend' => 'mail', // can be one of 'mail', 'sendmail', 'smtp'

    // sendmail parameters (only needed for 'backend' => 'sendmail')
    'sendmail_path' => '/usr/bin/sendmail',
    'sendmail_args' => '',

    // SMTP parameters (only needed for 'backend' => 'smtp')
    'host'     => 'smtp.example.com',
    'port'     => '25',
    'auth'     => false,
    'username' => 'smtp-username',
    'password' => 'smtp-password'
);
 


Look at your SMTP settings, if you would put something like smtp.google.com as your outgoing server, then you would need to make sure you fill in the auth = true, username and password properly for your outgoing account.

Hope that helps...

Thanks!
Mark
 Quote

stolidus

Anonymous
Thanks for the reply.

I tried the smtp backend and it does not send out any e-mails. When using the adminmail.php for sending to groups it returns with a no messages successfully sent without explaining further.

Also when sending to a single user it returns a message successfully sent block but then the e-mail is lost in process somewhere and never gets delivered.

Out of ignorance, I thought that php did not need sendmail and so was trying to make the mail function work... :banghead:

Any suggestions?
 Quote

Stolidus

Anonymous
Ok, I think I have found the problem with smtp...

The mail relay I am connecting to forces SSL.

Is there a quick fix for this? Is there a line of code or a change I can make to authenticate with SSL when using the smtp backend?

Thank you again.
 Quote

Stolidus

Anonymous
Decided to go with another mail relay and it works. The e-mail works! Thank you all for the time and help. Now on to other issues. :wink:
 Quote

Joe

Anonymous
angry
Stolidus: You are really selfish person, ppl here are sacrificing helping you to solve your problem, when u discovered new way to solve it, you never made mention here how you had solved it, you should post on this forum on how you solved this problem, selfish person
 Quote

pawel

Anonymous
Joe: Read again last Stolidus's post (it's just above yours), there IS the solution.
 Quote

All times are EDT. The time is now 10:56 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content