PDA

View Full Version : Email alerts not working


adellos
10-31-2008, 04:36 PM
Hello,
I have read every single post on email issues and email alerts not working. I have followed Zoidbergs instructions on PHP mailer and all threads pertaining to it. So here is my problem:

When there was a SQL error osTicket sent me an alert using my admin account. When someone creates a ticket, there are no emails sent out at all. I need this to work so I dont have to check the workorder system every 5 seconds to make sure someone didnt post a ticket. Can someone please help. Thank you guys so much for the help. Have a good day

Corey
10-31-2008, 05:11 PM
Sometimes un-installing it and then re-installing it with the correct email settings will work.

Are you positive you have everything needed enabled?

adellos
10-31-2008, 06:35 PM
Yes i am very sure that everything is enabled, alerts at department level and so on up and down. I have uninstalled it and reinstalled it with the same database and even with a new database. Downloaded a legacy version and installed that with its own database and same thing.

The email functionality worked great before i switched over to windows hosting with php 5 support. On a shared hosting linux server email functionality worked GREAT. Then after i switched to a windows with II7 and php5 enabled it stopped working. But alerts on databse errors still email me when there is a problem? uhhh makes no sense. Thanks!!

adellos
10-31-2008, 11:47 PM
function sendmail($to, $subject, $message, $fromaddress,$fromname='', $xheaders = '') {
//TODO: provide an option to use SMTP server. Log all outgoing emails??

$eol="\n";
$fromname=$fromname?$fromname:$fromaddress;
//do some cleanup...avoid stupid errors.
$to=preg_replace("/(\r\n|\r|\n)/s",'', trim($to));
$subject=preg_replace("/(\r\n|\r|\n)/s",'', trim($subject));
$message = preg_replace("/(\r\n|\r)/s", "\n", trim($message));

CHANGE THIS LINE OF CODE, IT WORKED FOR ME!!
change from
$message = preg_replace("/(\r\n|\r)/s", "\n", trim($message));

change to
//$message = preg_replace("/(\r\n|\r)/s", "\n", trim($message));
comment that line out and it works!!!!

prettyreplica
12-29-2008, 04:02 PM
Same ask

thanks