Hi,
Thanks for taking the time to look.
Recently setup a joomla site which I've never had problems with before however my new hosting company have different rules!
Basically all the forms on my site work (cashagent.co.uk) however I do not receive any emails from them.
they tell me -
"This issue is occuring because there is a missing fifth parameter in your mail script. This has always been a requirement of mail scripts on our shared hosting platform but recent updates to our Linux servers (from PHP4 to PHP5) has meant that this is now always required."
...and then directed me to this information
"Sendmail Functions
What is the path to Sendmail?/usr/sbin/sendmail -fuser@domainname.co.uk
You need to replace -fuser@domainname.co.uk with a valid mailbox on your account:
ie -froot@yourdomain.co.ukYou must leave in the -f and make sure there is a \ before the @
An example of how to use this is displayed below:
mail($to, $sub, $mess, "From: root@yourdomain.co.uk", "-froot@yourdomain.co.uk");Please note when sending email from a script on your website either the to or from address needs to be a valid email account that is setup, eg root@yourdomain.co.uk "
I have being playing around with this and still can't get any emails
My current code is this -
/**
* Sends mail using the PHP mail() function.
* @access private
* @return bool
*/
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", "-fsales\@cashagent.co.uk");
$rt = @mail("sales@cashagent.co.uk", $this->EncodeHeader($this->Subject), $body,
$header, $params);
}
else
{
$params = sprintf("-oi -f %s", "-fsales\@cashagent.co.uk");
$rt = @mail("sales@cashagent.co.uk", $this->EncodeHeader($this->Subject), $body, $header, $params);
}
if (isset($old_from))
ini_set("sendmail_from", $old_from);
if(!$rt)
{
$this->SetError($this->Lang("instantiate"));
return false;
}
return true;
}
This is just prt of the source code. I assume its all you need - if you need anything else to help you come to a conclusion please please please let me know!
Kind Regards
Fraser