I am trying to send mass emails using SwiftMailer , so far i am able to send single email successfully.
But the problem is i want to send different Messages to different Recipients from my database.
I know how to add multiple recipients using $message->addTo function but what about different messages content that we used to set using $message->setBody in a batch send.
so how can i send different messages to different recipients in a batch mode ?
here is format of my email , consider i am sending job matching profiles to 100 different users and each 100 different users has a different content
<User Name> <Email Address>
<Job Matching Title 1>
<Job Description>
<Job Matching Title 2>
<Job Description>
<Job Matching Title 3>
<Job Description>
As per comment, Decorator plugin could help you to achieve that –
http://swiftmailer.org/docs/plugins.html#decorator-plugin
Glad that it worked for you 🙂