Hallo,
ich habe in PHP ein Script gebastelt, das mir mit klick auf einen Link im Ticket eine Datenbankabfrage macht. Das funktioniert schon mal. Jetzt möchte ich noch eine Email mit den Daten aus der DB an bestimmte Personen versenden. Da OSTicket ja Emails versenden kann, frage ich mich, wie ich diese interne Email-Funktion in PHP nutzen kann? Wäre dann auch noch super, wenn ich das Versenden der Email auch noch im Ticket dokumentiert habe.
Danke, für Eure Hilfe!
PHP has a mail() function that you can use to send emails.
The function that osTicket uses to send mail is "Mailer::send"
Thank you, ntozier! I have found this statement in the sourcecode... Mailer::sendmail($to, $subject, $message, '"'.('osTicket Alerts').sprintf('" <%s>',$to)); Do you know, what this do ... '"'.('osTicket Alerts').sprintf('" <%s>',$to) ???
I've never played with this function so I have no idea.
I have try it with ... include_once(INCLUDE_DIR.'class.mailer.php'); ... Mailer::sendmail($to, $subject, $message, $from); ...but it don't works. I have no idea, where the mistake is or what it needs for working.