Writing a script to automate replies from manage engine.

Writing a script to automate replies from manage engine.

Hi,

Our organisation has recently requested new statuses be set up for service requests other then the standard request statuses. they have also requested that we have automatic emails sent to users explaining the status change when the status is updated. i have the script pretty much working except for one little problem. The Argument or variable i was using to cheat in their email address isn't working how I hoped. rather then pulling in the requester's email address it adds the email address of the technician who updated the status. Our email address standard is firstname.lastname@corporation.com.au so to cheat in the email address I was using the argument LOGIN_NAME@corporation.com.au. I will include the script below. I have only left in the part I am having trouble with. If anyone could provide me with an argument that will actually pull in the users full email address i would be eternally grateful, I have looked all over and cant find it anywhere:


$requesterlogin = $obj.request.LOGIN_NAME   <---------my variable set up

$msg.From = "Helpdesk < helpdesk@corporation.com.au>"
$msg.To.Add("$ requesterlogin@corporation.com.au")  <---it should pull in the requesters login which is their firstname.lastname.
#$msg.To.Add("...") 
#$msg.cc.Add("...") 
#$msg.bcc.Add("...") 
$msg.Subject = "Request ID: $ticket : $subject"
$msg.Body = $body
$msg.IsBodyHTML = $true
$smtp.Send($msg)

                  New to ADSelfService Plus?