I'm trying to set a default sender to all messages in Swift Mailer 4.3.0, but couldn't find a proper solution. I want to avoid using ->setFrom() in every message, since it'll be a future headache. I could use a constant for that, but I was looking for a more elegant solution.
$message = Swift_Message::newInstance() ->setSubject('subject') ->setFrom(array('[email protected]' => 'Sender')) ->setTo(array('[email protected]')) ->setBody('Message'); Thanks!