I am migrating our mail platform,
I have for each user a file (I don’t have access to Sieve host)
that looks like this
require "vacation";
if not header :contains "Precedence" ["bulk","list"] {
vacation
:days 15
:addresses ["[email protected]", "[email protected]"]
:subject "Out of office Subject"
"Some out of office tekst
With multiple lines
another line"
;}
I want to get the subject and message in PHP as a variable for each. How can accomplish this?
2
Answers
You can use the
preg_match
to perform a regular expression match:A solution without regex looks like this:
Explanation:
$input
(you can loop an array of filenames, of course)$theString