Adding a custom header to inbound messages

From Cerberus Helpdesk Wiki

Jump to: navigation, search

First edit the following file. cerb4/plugins/cerberusweb.core/cron.classes.php, Pop3Cron::run(), (Build 890) line 1111

In that file and I see

if($fp) {
					fwrite($fp,$headers,strlen($headers));
					fwrite($fp,"\r\n\r\n");
					fwrite($fp,$body,strlen($body));
					@fclose($fp);

add "fwrite($fp,"\r\nX-Downloaded-From: $mailbox");" below the headers or whatever I want the inserted header to be called, if not X-Downloaded-From ? Example "fwrite($fp,"\r\nX-Downloaded-From: $account->nickname");"

Note: after the Header you have to insert "\r\n" or the head becomes part of the body.

So the final code is

if($fp) {
					fwrite($fp,$headers,strlen($headers));
					fwrite($fp,"\r\nX-Downloaded-From: $mailbox");
					fwrite($fp,"\r\n\r\n");
					fwrite($fp,$body,strlen($body));
					@fclose($fp);

Thanks Robert

PS and Thank You WebGroup Media, LLC. for you great email management software http:\\Cerb4.com

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox