Page 1 of 1
Blind copy?
Posted: Mon Apr 21, 2008 3:56 pm
by Josh
I've been using .94 for a while now and didn't even notice that a BCC e-mail was being sent to the server. My e-mail box is up around 1GB (I never check it - until now).
I had all the 3 address set as the donotreply@ address since no accounts are used on the server.
Support e-mail: [?]
Webmaster e-mail: [?]
No reply e-mail: [?]
I've since changed the support and webmaster e-mails to valid ones that I regularly use, but any new tickets and staff replies still BCC the donotreply address. Is there a way I can change the script to NOT BCC this address? Perhaps I have a glitch in a page of the script since I customized it slightly?
Thanks,
Josh
Posted: Mon Apr 21, 2008 4:14 pm
by Josh
My mistake. The mailbox is not that large. However, the donotreply address still appears to be copied.
When looking and the received e-mail, the donotreply@address shows up along with the users address. However, when you open the e-mail, only the users address shows up.
Under the properties of the e-mail it shows as;
xxxwebserver.xx.xx.edu
donotreply BC
I'm not sure why this is appearing suddenly.
Since it's never happened in the past I'm going to try a reboot out of curiosity. It's UNIX so I can't imagine that will have much affect.
Posted: Mon Apr 21, 2008 4:27 pm
by Josh
This thread would cover most of the customization with regards to e-mail. The problem happens when submitting a new ticket and when "assigning" tickets to staff by changing category. An e-mail is sent in both cases along with a BCC to the donotreply address.
viewtopic.php?p=6803&highlight=#6803
Posted: Mon Apr 21, 2008 5:09 pm
by Josh
Sorry to keep adding to this. I went back and found some previous reply e-mails from HESK. It seems the blind copy has always been sent but is only appearing as a "sent to" address as of this week. Since we piggy back on our main hospital e-mail system I have to assume something changed on their end. However, I would still like to change this setting if possible. Here is the submit_ticket code (where I think the BCC is generated).
Posted: Mon Apr 21, 2008 5:56 pm
by Klemen
Hesk doesn't generate any Bcc e-mail headers, this must be a setting on your server. Check with your host.
By the way, no need to paste code here, we all have access to the files

Posted: Mon Apr 21, 2008 7:07 pm
by Josh
Thanks Klemen. I am my own host so I'll have to give myself a call and complain. I thought that code might have contained a mistake on my part.
I'll see if I can figure it out. Thanks.
Posted: Mon Apr 21, 2008 7:48 pm
by Klemen
Check if you have anything set for mail.force_extra_parameters in php.ini
Other than that I wouldn't know where to look, could be an Apache/IIS setting.
Posted: Wed Apr 23, 2008 8:13 pm
by Josh
I couldn't find that parameter anywhere. It's strange, when I just create a simple php page as follows and e-mail it to myself there is no blind copy.
Both my UNIX and Linux server started displaying blind copy addresses to the to field. As far as permissions I own all the files. I assume that it's either the headers or the way the POP3 server is reading the file. There must have been a change somewhere.
I'm still stumped as to why the blind recipients are even being created. Unfortunately I don't know that much about e-mail.
Code: Select all
<?php
$to = "someone@example.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
Posted: Thu Apr 24, 2008 8:12 am
by Klemen
I never heard of anything like this before so I'm not sure what to tell you.
This is the exact code Hesk uses to send mail:
Code: Select all
$headers="From: $hesk_settings[noreply_mail]\n";
$headers.="Reply-to: $hesk_settings[noreply_mail]\n";
@mail($email,$hesklang['ticket_received'],$message,$headers);
So if you try:
Code: Select all
$email='someone@example.com';
$hesk_settings['noreply_mail']='you@yourdomain.com';
$subject='Test';
$message='Testing emails...';
$headers="From: $hesk_settings[noreply_mail]\n";
$headers.="Reply-to: $hesk_settings[noreply_mail]\n";
@mail($email,$subject,$message,$headers);
it will give the same results as Hesk.
Maybe one of your e-mail addresses generates copies? Try changing all your e-mail on the Hesk settings page to the same address, for example
you@yourdomain.com and see what happens.
Posted: Thu Apr 24, 2008 8:34 pm
by Josh
The code I posted does not create a blind copy. The hesk code does using the same address. Very strange.
I realize troubleshooting an email system doesn't have anything to do with coding so I appreciate you taking a few minutes to look.
I'll continue to look into this. It's more an nuisance than nothing functional. If a resolution is found, I'll post it.
-Josh
Posted: Thu Apr 24, 2008 10:21 pm
by Josh
On a hunch I deleted the second headers line.
Code: Select all
$headers.="Reply-to: $hesk_settings[noreply_mail]\n";
Although I have no idea why this fixes the problem, it does. From what I can gather in my small intellect the header parsing is being screwed up by the recipient and it doesn't understand the \n or character set.
That's just a guess. I haven't tested this fix with the production version yet.
Can you see any problem with removing this line of code if I can't alter it to be understood by the POP3 server?
I think the reply to line of code is being interpreted as a blind copy.
Posted: Fri Apr 25, 2008 3:59 pm
by Josh
Upon further testing, the following snippet produces the desired results and a normal looking e-mail.
Code: Select all
<?php
$email='jxx@xxx.edu';
$hesk_settings['noreply_mail']='donotreply@xxx.edu';
$subject='Test for Josh';
$message='Testing emails...';
$headers="From: $hesk_settings[noreply_mail]\n.";
$headers.="Reply-to: $hesk_settings[noreply_mail]\n";
@mail($email,$subject,$message,$headers);
?>
It has something to do with the PHP mail function getting along with Windows I think. The first headers line needs to end with "\n." in order for the recipient e-mail system to see two separate lines.
I will update the code on the production box now but I believe this should solve the problem.
This is a good reference for those interested.
http://us.php.net/manual/en/function.mail.php
Thanks for the help.