if(!empty($unsubscribe)){
$element = $doc->createElement('img');
-
+ $element->setAttribute('mailembed', 'no');
$element->setAttribute('src', $cfg ['server_baseurl'] . '/Crm/Open/' . $this->id . '/{person.id}.html');
$element->setAttribute('width', '1');
$element->setAttribute('height', '1');
* convert email with contents into a core mailer object. - ready to send..
* @param Object|Array $obj Object (or array) to send @see Pman_Core_Mailer
* + subject
- * + rcpts
+ * + rcpts || person << if person is set - then it goes to them...
* + replace_links
* + template
* + mailer_opts
+ * + person << who it actually goes to..
+ *
* @param bool $force - force re-creation of cached version of email.
*
* @returns Pman_Core_Mailer
if (is_a($r, 'PEAR_Error')) {
return $r;
}
- /**
- *
- * Usage:
- * $this->rcpts = array('sales@roojs.com');
- * // or
- * $this->rcpts = "Tester <sales@roojs.com>";
- *
- *
- * // then send it..
- * $x = DB_DataObject::factory('core_enum');
- * $x->get('name', 'NAME OF TEMPLATE');
- * $x->send(array(
- * 'rcpts' => "Tester <sales@roojs.com>",
- * 'page' => $this
- * 'mailer_opts' => array( <<< additional options, like urlmap..)
- * 'link' => 'http://......'
- );
- * // on the template use {link:h} to render the link
- *
- *
- */
+ return $r->toData();
+ }
+
function send($obj, $force = true, $send = true)
{
if (!$send) {
continue;
}
- $images["attachment-$i->id"] = array(
+ $images["attachment-{$i->id}"] = array(
'file' => $i->getStoreName(),
'mimetype' => $i->mimetype,
'ext' => $y->toExt($i->mimetype),