setProducer($producer); $automaticEmail->setDelayBeforeDistribution(2); $automaticEmail->setStatus(StatusInterface::STATUS_ONLINE); return $automaticEmail; } }