Blind copy?
Moderator: mkoch227
Blind copy?
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
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
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.
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.
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
viewtopic.php?p=6803&highlight=#6803
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).
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
By the way, no need to paste code here, we all have access to the files

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
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.
Other than that I wouldn't know where to look, could be an Apache/IIS setting.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
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.
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.";
?>
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:
So if you try:
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.
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);
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);
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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
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
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
On a hunch I deleted the second headers line.
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.
Code: Select all
$headers.="Reply-to: $hesk_settings[noreply_mail]\n";
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.
Upon further testing, the following snippet produces the desired results and a normal looking e-mail.
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.
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);
?>
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.