Hi guys
Thanks you for your replies.
I have been working very hard on this and finally finished this. Please note my goal is to write simple OOP code without coupling and dependencies ( I think they are the same ). I am not going to use containers yet.
Would you please let me know if I am doing well or not? Don’t be too hard on me 
It appears to me that the main class is just like a centre core that does NOTHING but using other classes ( I think they are called services, right? ) to do the job.
Of course these are going to be separate files and I will use auto loader to load these. Well 1 step at a time 
<?php
class sendCampaign
{
private $postedDeals = array();
private $dealsList = array();
private $buildEmailView;
private $signatureClass;
private $emailContent;
private $mailingList;
private $postedList;
private $validation;
private $signature;
private $template;
private $mailer;
private $deals;
private $title;
private $list;
public function __construct($campaignId = NULL, validation $validation, deals $deals, signatureClass $signatureClass, template $template, email $email, mailingList $mailingList, mailer $mailer)
{
if(!$this->forcePost())
return false;
if(!$this->assignPostedData())
return false;
if(!$this->validateCampaign($campaignId, $validation))
return false;
if(!$this->validateDeals($this->postedDeals, $validation))
return false;
if(!$this->addDealsToTemplate($this->postedDeals, $template))
return false;
if(!$this->receiversAddresses($campaignId, $mailingList))
return false;
if(!$this->sendEmails($this->emailContent, $this->title, $this->list, $mailer))
return false;
}
private function sendEmails($content, $title, $receivers, $mailer)
{
$this->mailer = $mailer;
if(!$this->mailer->sendEmail($content, $title, $receivers))
{
errors::showError('Emails were NOT sent successfully');
return false;
}
}
private function receiversAddresses($campaignId, $mailingList)
{
$this->mailingList = $mailingList;
return $this->list = $this->mailingList->buildList($campaignId);
}
private function assignPostedData()
{
$this->postedDeals = ($_POST['postedDeals']) ? $_POST['postedDeals'] : $this->postedDeals;
$this->postedList = ($_POST['postedList']) ? $_POST['postedList'] : $this->postedList;
$this->title = ($_POST['title']) ? $_POST['title'] : $this->title;
return true;
}
private function forcePost()
{
if(!$_POST)
{
errors::showError('No data has been posted');
return false;
}
return true;
}
private function addDealsToTemplate($deals, $template)
{
if(!$loadedTemplate = $template->load('dealsList'))
{
errors::showError('Could not load email template');
return false;
}
else
{
echo "Template loaded<br />";
$this->emailContent = $template->addDeals($loadedTemplate, $deals);
return $this->emailContent;
}
}
private function validateCampaign($id, $validation)
{
$this->validation=$validation;
if(!$this->validation->validateCampaignIdDB($id))
return false;
return true;
}
private function validateDeals($deals, $validation)
{
$this->validation=$validation;
if(!$this->validation->validateDealIdDB($deals))
{
errors::showError('Posted deals are invalid');
return false;
}
return true;
}
private function buildSignature($signatureClass, $id)
{
$this->signatureClass = $signatureClass;
$this->signature = $this->signatureClass->getSignatureDetails($id);
}
private function generateListOfDeals($deals, $buildEmailView)
{
$this->deals = $deals;
if(count($this->dealsList = $this->deals->dealsList(array()))==0)
$this->dealsList = "";
return $this->dealsList;
}
}
class mailingList implements mailingListInterface
{
public function buildList($campaignId)
{
if(1==1) //check with DB
{
$list = array('email@eamil.com', 'email2@email.com');
return $list;
}
else
{
return false;
}
}
}
interface mailerInterface
{
public function sendEmail($content, $title, $mailingList);
}
class mailer implements mailerInterface
{
private $headers;
public function sendEmail($content, $title, $mailingList)
{
foreach($mailingList as $email)
{
mail($email, $title, $content, $this->headers);
}
echo "Emails were sent successfully";
return true;
}
}
interface mailingListInterface
{
public function buildList($campaignId);
}
class email implements emailClassInterface
{
public function sendEmail($content, $mailingList)
{
return true;
}
}
class signatureClass implements signatureClassInterface
{
public function getSignatureDetails($id)
{
return true;
}
}
class errors
{
public static function showError($errorMessage=NULL)
{
echo $errorMessage;
}
}
class validation
{
public function validateCampaignId($id=NULL)
{
if(is_null($id) || !is_numeric($id))
{
errors::showError('Invalid Campaign Id<br />');
return false;
}
else
{
echo "Validation passed.<br />";
return true;
}
}
public function validateCampaignIdDB($id)
{
if(1!=1)//Check with DB
{
echo "Campaign NOT found in DB.<br />";
return false;
}
echo "Campaign found in DB successfully.<br />";
return true;
}
public function validateDealIdDB($postedDeals)
{
//Check with DB, if DB results exist
if(count($postedDeals)>0)
{
//Check with DB
echo "Deals found in DB<br />";
return true;
}
else
{
echo "No deals posted<br />";
return false;
}
}
}
class deals implements dealsInferace
{
public function dealsList($deals = NULL)
{
return $deals;
}
}
class template
{
private $list;
public function load($file)
{
$file="templates/".$file.".php";
if(file_exists($file))
{
if(!file_get_contents($file))
return false;
else
return $file;
}
else
{
return false;
}
}
public function addDeals($file, $deals)
{
foreach($deals as $val)
{
$this->list .= "<tr><td>".$val."</td></tr>";
}
$file = str_replace("#DEALS#", $this->list, file_get_contents($file));
echo "Deals successfully added to the template<br />";
return $file;
}
}
interface dealsInferace
{
public function dealsList($deals = NULL);
}
interface signatureClassInterface
{
public function getSignatureDetails($id);
}
interface buildEmailViewInterface
{
public function dealsList($deals);
}
interface emailClassInterface
{
public function sendEmail($content, $mailingList);
}
$object = new sendCampaign(2, new validation(), new deals(), new signatureClass(), new template(), new email(), new mailingList(), new mailer());
?>