ref #4123 - adapt changes for logging and mail-builder