1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
public function outlookAction($id)
{
$message = '
dim contents
contents = contents & "<html>"
contents = contents & "<head>"
contents = contents & "</head>"
contents = contents & "<body>"
contents = contents & "<strong>Incidents</strong>"
contents = contents & "<br />"
contents = contents & "commentaires"
contents = contents & "<br /><br />"
contents = contents & "<strong>Changements sur la période à venir</strong>"
contents = contents & "<br />"
contents = contents & "commentaires"
contents = contents & "<br /><br />"
contents = contents & "<strong>Etat des applications</strong>"
contents = contents & "<br />"
contents = contents & "etatdesapplications"
contents = contents & "</body>"
contents = contents & "</html>"
Set fso = CreateObject("scripting.filesystemobject")
Set objOL = CreateObject("Outlook.Application")
Set objMail = objOL.CreateItem(0)
With objMail
.To = "to"
.Cc = "cc"
.SentOnBehalfOfName = "nom"
.Subject = "Situation"
.HTMLBody = contents
.Display
End With
';
$message = utf8_decode($message);
$response = new Response();
$response->setContent($message);
$response->headers->set('Content-Type', 'application/x-vbs');
$response->headers->set('Content-Disposition', 'attachment; filename="outlook_meteo.vbs"');
return $response;
} |