dizzy
21.12.2004, 00:13
I use Mambo 451a patch SafeModeOn hosted by Laposte.net (who is under draft lycos). Php mail function is available.
But any email is received, it does not matter the sending option (php mail, sendmail, smtp) or sending forms (with "Contact-us", or mass Mail ...)
Any activation email is received after registration.
However, with contact-us form, the contact (the admin) receive an email (but not the author of the message, even if chekbox is checked).
The received Email by admin indicates that the sender is sfweb@lycos.lp whereas in \configuration.php I have: $mosConfig_mailfrom = 'admin.sfweb@laposte.net';
Why?
Does have a relationship with safe_mode ON as lets it think the line in red below?
In components\com_contact\contact.php:
function sendmail( $con_id, $option ) {
[...]
mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $email_to, $subject, $text );
if ( $email_copy ) {
$copy_text = sprintf( _COPY_TEXT, $mosConfig_sitename );
$copy_text = $copy_text ."\n\n". $text .'';
$copy_subject = _COPY_SUBJECT . $subject;
mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $email, $copy_subject, $copy_text );
}
In \includes\mambo.php:
function mosMail($from, $fromname, $recipient, $subject, $body) {
[...]
$mail = mosCreateMail($from, $fromname, $subject, $body);
[...]
$mailssend = $mail->Send();
[...]
}
In \includes\phpmailer\class.phpmailer.php:
function MailSend($header, $body) {
$to = "";
for($i = 0; $i < count($this->to); $i++)
{
if($i != 0) { $to .= ", "; }
$to .= $this->to[$i][0];
}
if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1)
{
$old_from = ini_get("sendmail_from");
ini_set("sendmail_from", $this->Sender);
$params = sprintf("-oi -f %s", $this->Sender);
$rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
$header, $params);
}
else
$rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);
if (isset($old_from))
ini_set("sendmail_from", $old_from);
if(!$rt)
{
$this->SetError($this->Lang("instantiate"));
return false;
}
return true;
}
But any email is received, it does not matter the sending option (php mail, sendmail, smtp) or sending forms (with "Contact-us", or mass Mail ...)
Any activation email is received after registration.
However, with contact-us form, the contact (the admin) receive an email (but not the author of the message, even if chekbox is checked).
The received Email by admin indicates that the sender is sfweb@lycos.lp whereas in \configuration.php I have: $mosConfig_mailfrom = 'admin.sfweb@laposte.net';
Why?
Does have a relationship with safe_mode ON as lets it think the line in red below?
In components\com_contact\contact.php:
function sendmail( $con_id, $option ) {
[...]
mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $email_to, $subject, $text );
if ( $email_copy ) {
$copy_text = sprintf( _COPY_TEXT, $mosConfig_sitename );
$copy_text = $copy_text ."\n\n". $text .'';
$copy_subject = _COPY_SUBJECT . $subject;
mosMail( $mosConfig_mailfrom, $mosConfig_fromname, $email, $copy_subject, $copy_text );
}
In \includes\mambo.php:
function mosMail($from, $fromname, $recipient, $subject, $body) {
[...]
$mail = mosCreateMail($from, $fromname, $subject, $body);
[...]
$mailssend = $mail->Send();
[...]
}
In \includes\phpmailer\class.phpmailer.php:
function MailSend($header, $body) {
$to = "";
for($i = 0; $i < count($this->to); $i++)
{
if($i != 0) { $to .= ", "; }
$to .= $this->to[$i][0];
}
if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1)
{
$old_from = ini_get("sendmail_from");
ini_set("sendmail_from", $this->Sender);
$params = sprintf("-oi -f %s", $this->Sender);
$rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
$header, $params);
}
else
$rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);
if (isset($old_from))
ini_set("sendmail_from", $old_from);
if(!$rt)
{
$this->SetError($this->Lang("instantiate"));
return false;
}
return true;
}