Add user-email field in email send to staff

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Robert
Posts: 3
Joined: Fri Mar 11, 2011 8:58 am

Add user-email field in email send to staff

Post by Robert »

Script URL:
Version of script: 2.2
Hosting company: Aruba Spa
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi,

Im trying to insert "email" variable (%%EMAIL%%) in email send to staff but not work.

new_ticket_staff.txt
--------------------------------
Nome: %%NAME%%
Email: %%EMAIL%%
Oggetto: %%SUBJECT%%
Messaggio: %%MESSAGE%%
Puoi gestire il ticket a questo indirizzo:
%%TRACK_URL%%
--------------------------------

can someone help me?
thx
Robert
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Add user-email field in email send to staff

Post by Klemen »

Open inc/common.inc.php in Notepad and below

Code: Select all

$msg = str_replace('%%SITE_URL%%',$hesk_settings['site_url'],$msg);
add

Code: Select all

$msg = str_replace('%%EMAIL%%',$ticket['email'],$msg);
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
Robert
Posts: 3
Joined: Fri Mar 11, 2011 8:58 am

Re: Add user-email field in email send to staff

Post by Robert »

Hi !

I'm sorry but nothing happens..!

code in common.inc.php

Code: Select all

/* Replace all special tags */
	$msg = str_replace('%%NAME%%',		stripslashes($ticket['name'])	,$msg);
	$msg = str_replace('%%SUBJECT%%',	stripslashes($ticket['subject']),$msg);
	$msg = str_replace('%%TRACK_ID%%',	$ticket['trackid']				,$msg);
	$msg = str_replace('%%TRACK_URL%%',	$trackingURL					,$msg);
	$msg = str_replace('%%SITE_TITLE%%',$hesk_settings['site_title']	,$msg);
	$msg = str_replace('%%SITE_URL%%',	$hesk_settings['site_url']		,$msg);
	$msg = str_replace('%%EMAIL%%',		$ticket['email']				,$msg);
	$msg = str_replace('%%CATEGORY%%',	$ticket['category']				,$msg);
	$msg = str_replace('%%PRIORITY%%',	$ticket['priority']				,$msg);
    $msg = str_replace('%%OWNER%%',		$ticket['owner']				,$msg);

text in new_ticket_staff.txt

Code: Select all

Ticket ID: %%TRACK_ID%%
--------------------------------
Nome: %%NAME%%
Email: %%EMAIL%%

Oggetto: %%SUBJECT%%
Messaggio: %%MESSAGE%%

this is the email..

Ticket ID: LNQJSPBS2V
--------------------------------
Nome: Norberto Carli
Email:

Oggetto: Prova
Messaggio: rthsrhtsrhth
hrt rthrthrthrtrh thtrhtrhtrh


Thank you in advance.
Robert
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Add user-email field in email send to staff

Post by Klemen »

Sorry, you also need to edit submit_ticket.php just below

Code: Select all

	'category' 	=> $tmpvar['category'],
add

Code: Select all

	'email'	=> $tmpvar['email'],
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
Post Reply