protected function normalizeMailArgs(array $args)
{
// If the first argument is an array, use it as the mail configuration
if (is_array($args[0])) {
return $args[0];
}
$result = [];
$length = count($args);
// FIXME This is a weak way to handle the arguments, since a change in the order will break it
for ($i = 0; $i < $length; $i++) {
$result[$this->argumentsMapping[$i]] = $args[$i];
}
return $result;
}