Guys, im still in trouble!! =(
To make this customization possible i created a Windows PoweShell code to send an e-mail to maileater with %STATUS=CLOSED with a single click, code bellow:
######### Inicio do Script #########
#### Configurando Servidor Smtp #################
$servidor = "smtpsrv.mj.gov.br";
$porta_smtp="25";
$porta_smtp_ssl="587";
#### Configurando Conta Smtp ####################
$conta = "sati@mj.gov.br";
$senha = "123456";
#### Configurando Assunto e corpo da mensagem##########
$assunto = "@{call_req_id.web_url}+INSTANCE=@{id}";
$assunto = System.Text.UTF8Encoding($assunto);
$corpo = "%%STATUS=Fechada";
#### Configurando E-mail do Destinatario das Mensagens ########
$destinatario = "Diego.Gomes@consorciomais2web.com.br";
#### Configurando Diretório para execução do envio de e-mail ######
$SMTPSend="C:\Users\servicedesk\Documents\sendmail";
Set-Location $SMTPSend;
#### Exportando o comando para execução em arquivo batch com suporte a smtp comum ##########
envia_email="cmd.exe /C smtpsend.exe -f$conta -t$destinatario -s$assunto -mbt$corpo -a$anexo -h$servidor -p$porta_smtp -lu$conta -lp$senha";
echo $envia_email | Out-File -FilePath envia-email.bat -Encoding ASCII;
#### Executa envio de e-mail #####
.\envia-email.bat;
#### Exportando o comando para execução em arquivo batch com suporte a smtp com ssl ##########
$envia_email_ssl="cmd.exe /C smtpsend.exe -f$conta -t$destinatario -s$assunto -mbt$corpo -a$anexo -h$servidor -p$porta_smtp_ssl -lu$conta -lp$senha";
echo $envia_email_ssl | Out-File -FilePath envia-email-ssl.bat -Encoding ASCII;
#### Executa envio de e-mail com suporte ssl #####
.\envia-email-ssl.bat;
#### Remove arquivo .bat depois da execução por segurança #########
del -rec envia-email.bat;
del -rec envia-email-ssl.bat;
# OBS: Descomente a seção de Exportação do arquivo bat no qual irá utilizar para enviar o seu e-mail, se for utilizar smtp comum ou smtp com ssl.
######### Fim do Script #########
Ok, the e-mail is being sent with the arguments that i need.
The problem is, how can i put this .ps1 file on a image in notification message?
I put this file in HTML notification message, as shown below:
<p><img align="left" width="90" length="90" src="like_image_url" onclick="window.open('file:sendmail.ps1')">
I´m no able to know if this customization is the best and secure way to finally resolve this issue!
I understand that is no easy to run a script on a computer with a single click, in my tests to run a script with a single click a lot of configurations and security exceptions were made in my computer to allow the execution of this functionality, and i really dont know if this is the better way to make the customer close your ticket without leaving your e-mail message.
I dont know if the notification message is being sent when a put the code bellow into "like" image, the message is not being sent! =/
Can help me with some ideas to make this happen?
My customer is about to drive me crazy!!!!
Many thanx again!!!