Script doesnt send email notifications

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
power
Posts: 31
Joined: Fri Feb 16, 2007 3:05 am

Script doesnt send email notifications

Post by power »

a
Last edited by power on Sat Feb 17, 2007 6:13 pm, edited 1 time in total.
power
Posts: 31
Joined: Fri Feb 16, 2007 3:05 am

Post by power »

The script did send emails at first, but it stoped after 2 days......alot of people here posted the same issue many many times......this is a problem with the script. please look into it, thanks
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

This is NOT a problem with the script, this is a problem with your SERVER setup. Ask anyone who understands PHP to look into the code and he/she will tell you the same. Since you obviously aren't fluent in PHP please don't make such hard-headed assumptions.

You said yourself it was sending out e-mails fine at first - what happened after 2 days? Nothing changed in the script code so how can the script be blamed? Also e-mail sending works fine on over 99% of servers Hesk is installed on.

Since you didn't even take the time to post the required information I guess you didn't even search the forum properly. I've posted this before in this forum, but to sum up a few possible problems (all server-side). It is important to check things in this exact order:

1. is your PHP mail() function configured properly? Check with your hosting company.

2. make sure your server allows sending e-mails from user "Nobody", PHP and CGI scripts usually run as "Nobody"

3. some servers don't allow sending e-mails to third party domains. Test it with LOCAL domains only (domains hosted on your server). Set $hesk_settings['noreply_mail'] to an EXISTING e-mail address under your domain (domain where Hesk is installed). Then submit a ticket using a local domain as well and see if you get the e-mails. DO NOT USE YOUR HOTMAIL ADDRESS TO TEST THESE LOCAL SETTINGS!!! Use an e-mail address of type @yourdomain.com

4. Download e-mail test file:
http://www.phpjunkyard.com/extras/email_test.zip
Open it in Notepad, set SENDER to the same address as $hesk_settings['noreply_mail'] and RECIPIENT to the same address you used to submit the ticket. Upload to server and open in browser. Do you get any mails to the RECIPIENT address?

5. Do you have any other PHP scritps on yoru server that successfully send mail? If yes:
a) try with the same e-mail addresses
b) post a link to the scripts here

6. Check your Exim (or other mail server) logs and queue - any signs of Hesk mails?

7. Just a thought - check inside your Spam/Junk folder and make sure you don't have any Spam filters blocking Hesk mails.


Try all of the above. Come back with results. Also if you need any further help come back with required info, starting with URL to your Hesk and URL to phpinfo.php file.

One final thought - nobody forces you to purchase a license and you surely won't get any better support if you do. The purpose of the license is not paying for support, my (limited) support is FREE. If I charged for support it would cost more than 10 EUR :wink:
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
power
Posts: 31
Joined: Fri Feb 16, 2007 3:05 am

Post by power »

im not a php newbiew, but ill look in to it more, thanks
Last edited by power on Sat Feb 17, 2007 6:12 pm, edited 2 times in total.
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

So, how did it go?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
sunnyzimm
Posts: 1
Joined: Fri Apr 04, 2008 4:11 am

mail() has been disabled for security reasons

Post by sunnyzimm »

My host has recently disabled the PHP mai() function, I am now forced to use phpmailer or any alternative that uses SMTP I guess. Below is a code of the form that currently works using the phpmailer class.

Code: Select all

<?

require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();

$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "mail.webhoop.com"; // SMTP server
$mail->AddAddress("lala@lala.com");

$today = date("M d, Y");

$name = $_POST['name'];
$address = $_POST['address'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$subject = "Feedback from $name";

$mail->Subject = $subject;

$forminfo ="
Name: $name\n
Location: $address\n
Email: $email\n
Phone: $phone\n
Message: $message\n
Form Submitted: $today\n\n";

$mail->From = "$email";
$mail->Body = "$forminfo";

if(!$mail->Send())
{
   echo "Message was not sent";
   echo "Mailer Error: " . $mail->ErrorInfo;
} else {
// do nothing
}


?>
Is there anyway I can use the phpmailer script to work with hesk mail functions?

Thanks in advance!
Post Reply