Quick hack to make gsuite work with document emailer
This commit is contained in:
parent
d00128e913
commit
912f04cddd
|
|
@ -811,7 +811,11 @@ ENDINSTRUCTIONS;
|
||||||
$enquiry = $this->Document->Quote->Enquiry->read(null, $document['Quote']['enquiry_id']);
|
$enquiry = $this->Document->Quote->Enquiry->read(null, $document['Quote']['enquiry_id']);
|
||||||
$this->set('enquiry', $enquiry);
|
$this->set('enquiry', $enquiry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function email_format($a) {
|
||||||
|
return "<".$a.">";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email the PDF(document + attachments) for this Document to a Recipient (Customer or Principle).
|
* Email the PDF(document + attachments) for this Document to a Recipient (Customer or Principle).
|
||||||
|
|
@ -844,11 +848,13 @@ ENDINSTRUCTIONS;
|
||||||
}
|
}
|
||||||
$enquiry = $this->Document->getEnquiry($document);
|
$enquiry = $this->Document->getEnquiry($document);
|
||||||
|
|
||||||
$this->Email->to = $enquiry['Contact']['email'];
|
$this->Email->to = $this->email_format($enquiry['Contact']['email']);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Uncomment this when going live
|
//Uncomment this when going live
|
||||||
$this->Email->cc = array($enquiry['User']['email']);
|
$this->Email->cc = array($this->email_format($enquiry['User']['email']));
|
||||||
$this->Email->bcc = array('carpis@cmctechnologies.com.au');
|
$this->Email->bcc = array($this->email_format('carpis@cmctechnologies.com.au'));
|
||||||
|
|
||||||
$this->Email->replyTo = $enquiry['User']['email'];
|
$this->Email->replyTo = $enquiry['User']['email'];
|
||||||
$this->Email->from = 'CMC Technologies - Sales <sales@cmctechnologies.com.au>';
|
$this->Email->from = 'CMC Technologies - Sales <sales@cmctechnologies.com.au>';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue