Welcome to Elgg's documentation
This is the place to find documentation on all aspects of Elgg. If you would like to contribute your own documentation please do; we want this to be a real community effort!
Invitation Is Not Sent Out
From Elgg Documentation
Contents |
[edit] Problem
I did what seems to be a successful installation of Elgg. Attempted to create a few test accounts but the (email) invitations didn't get sent out. We have a LAMP environment. Could the problem be related by the fact that 'register_globals' is off? Or, what is the appropriate config.php setting in the SMTP segment of the script? Or, is there something else I may be missing?
[edit] Approaches
In the config.php located in the elgg root directory check that you have set the 'smtphosts' directive, as in:
-
$CFG->smtphosts= 'smtp.hostname.com'; // empty (sendmail), qmail (qmail) or hosts
This worked for me :-)
--Markpea 16:36, 21 November 2007 (UTC)
$CFG->smtpuser = 'youruser'; $CFG->smtppass = 'yourpassword';
Don't forget to restart your server.
[edit] If mail() is setup correctly on your server
Firstly, explicitly set the config smtphosts var in config.php to an empty value e.g.
$CFG->smtphosts= '';
Secondly edit the MailSend function in /lib/phpmailer/class.phpmailer.php to read
function MailSend($header, $body) {
$to = "";
for($i = 0; $i < count($this->to); $i++)
{
if($i != 0) { $to .= ", "; }
$to .= $this->to[$i][0];
}
$rt = mail($to, $this->EncodeHeader($this->Subject), $body, $header);
if(!$rt)
{
$this->SetError($this->Lang("instantiate"));
return false;
}
return true;
}
I don't know enough about sendmail configuration to tell you why this works, but by default the MailSend function passes some additional parameters to sendmail which cause the function to fail on certain server configurations... Anyhow, this worked for me :-) Richardt 00:03, 2 May 2008 (UTC)
[edit] Problem 2
I have a similar problem. I am getting a message
ERROR: The following From address failed: myemailaddress.
I have added the line recommended in previous posting to the config.php file. Is there anything else I need to do?

