Mike,
Thanks for your posting and code. I added it to the script you mentioned
and was able to get the email portion working. I copied the code into the
script so that when I assign a ticket to another user an email will be sent
to that user. I saw a couple of postings on that question as well. To get
that to work I simply added your code to the vj_addevent.scp.php script and
then changed the $mailto variable to "$lstAssignedto" - this will send it to
the new assignee. This variable looks like number one - 1stAssignedto - but
after trying this a couple of times trying to find the correct variable I
noticed that it is actually a lower-case letter l. I changed it to l and it
worked. Thanks for your help.
-Paul
From: Mike Maki <mmaki@ad...>
Re: Automatic email send with ticket creation
2002-06-28 15:56
Yes Paul there is. This is a simple edit, but it works.
Edit addjob.scp.php.
Find $mailto = "$txtUserEmail";
Change it to $mailto = "$txtUserEmail, paul.greidanus@ua...";
You can add as many recipients as you like separated by commas.
I have even modified my scripts so an email is sent to the user when ever
an
event is added, that way they are notified whenever I update their ticket.
If you want that ability add the following to vj_addevent.scp.php after the
last occurrence of $mysqlresult = query($query); (It's near the bottom).
Watch for wrapped text below. Each line begins with $mailbody except for
the
last two lines. They begin with "mail" and "print". To be safe, make backup
copies of these files before you modify them.
$mailto = "$t_useremail";
$mailsubject = "$g_title - Ticket #$t_id has been updated!";
$mailbody = "$t_userfirstname,\n\n";
$mailbody .= "Your Help Desk request has been updated. Below is a copy of
the updated information.\n\n";
$mailbody .= "Thanks,\n\n";
$mailbody .= "Mike\n";
$mailbody .= "x2323\n\n";
$mailbody .= "ORIGINAL
REQUEST\n-------------------------------------------------------------------
-----\n";
$mailbody .= "Division: $lstDepartment\n";
$mailbody .= "Category: $lstCategory\n";
$mailbody .= "Summary: $txtSummary\n";
$mailbody .= "Detail: $txtDetail\n";
$mailbody .= "Location: $txtLocation\n";
$mailbody .= "\n";
$mailbody .= "UPDATE\n";
$mailbody .=
"------------------------------------------------------------------------\n"
;
$mailbody .= "$txtDescription\n\n Time: $txtDuration hour(s)\n";
$mailbody .=
"------------------------------------------------------------------------\n"
;
$mailheader = "From: mike_maki@np...";
$mailbody = stripslashes($mailbody);
mail($mailto, $mailsubject, $mailbody, $mailheader);
print "<center>A receipt was sent to $t_userfirstname
$t_userlastname<BR></center>\n";
I've only been using phpHelpDesk for a few weeks and have found it to be an
excellent program. Thank you Joseph Hoot and the other developers for a
great work!
Mike
----- Original Message -----
From: "Paul Greidanus" <paul.greidanus@ua...>
To: <phphelpdesk-help@so...>
Sent: Friday, June 28, 2002 9:32 AM
Subject: [Phphelpdesk-help] Automatic email send with ticket creation
> Is there a way to have phphelpdesk send emails when a ticket is created?
>
> I don't want to have to be checking the queue all the time to find out
> if there are any new tickets, when email would be much more effective..
>
> Thanks
>
>
>
>
Paul "Skip" Weintraub
IT Specialist
Financial Engineering Associates, Inc.
2201 Dwight Way
Berkeley, CA 94704-2114, US
Direct: +1-510-548-6200
Fax: +1-510-548-0332
Email: pa...@fe...
Web: www.fea.com
|