I need a little help here, I just switched to a vps from a shared hosting package both were on a Linux Server.
On the vps I have qmail installed and running.
My PHP Mail Function worked just fine in the SH package but with the vps it is not.
I have redirected the [mail function] in the php.ini file but it does not work.
[mail function]
; For Win32 only.
;SMTP = smtp.example.com
;smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /var/qmail/bin/sendmail -t -i
I have this line of code in my scripts
if( mail($to, $subject, $message, $headers) ){
$connection = new mysqli($h['DOST'], $u['DOST'], $p['DOST'], $d['DOST']);
$connection->select_db($d['DOST']);
$EnteredBy = $_SESSION['enam'];
$SentOn = date('Y-m-d H:m:s');
$qry="INSERT INTO tblOrderCommunications ";
$qry.="(OrderID, EmployeeID, OCWho, OCWhat, OCWhen, Details, DateEntered, EnteredBy) ";
$qry.="VALUES ('$OrderID', '$LastModifiedBy', 'FNP', '$EmailTemplate', '$SentOn', '".mysql_escape_string($message)."', '$SentOn', '$EnteredBy')";
$connection->query($qry);
$InsertedCOM=$connection->insert_id;
$msg .= '<p>Email sent to '.$to.' and added as communication <a href="comvw.php?DBID='.$InsertedCOM.'">'.$InsertedCOM.'</a> to order <a href="ordvw.php?DBID='.$OrderID.'">'.$OrderID.'</a>.</p>';
}
else{
$msg .= '<p>Email was not sent successfully.</p>';
}
Any help would be apprciated