https://bugs.kde.org/show_bug.cgi?id=361083

--- Comment #8 from Murz <mur...@gmail.com> ---
I plan to create custom cli script like crm_create_ticket.php with something:
<?php
  $input = file_get_contents("php://stdin");
  preg_match('/^CLIENT_NAME: (.*)$/', $input, $matches);
  $client_name=$matches[1];
  preg_match('/^MESSAGE_TITLE: (.*)$/', $input, $matches);
  $post['ticket_title']=$matches[1];
  preg_match('/^MESSAGE_TEXT: (.*)$\nCLIENT_NAME/', $input, $matches);
  $post['ticket_body']="Client name: $client_name \n Query: \n $matches[1];

    curl_setopt($curl, CURLOPT_URL, 'http://mycrm.com/create_ticket.php');
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
    $out = curl_exec($curl);
    echo $out;
    curl_close($curl);
?>
Or maybe bash equivalent of this process. 
So if KMail provide way to exec scripts and send message values to stdin of
script, there will be wide way for customisation and automation of mail
processing.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs

Reply via email to