This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

core:onSendEmail event

Triggered by Core_Email
Author LemonStand eCommerce Inc.

Event handler signature

public boolean event_onSendEmail(array $params)
$params array an list of the method parameters.
{return} boolean return TRUE if the default message sending should be stopped. Returns FALSE otherwise.
Triggered before LemonStand sends an email message. You can use this event to send email messages with third-party software or services. The event handler should accept a single parameter - the object containing information about the message to be sent. The object has the following fields:
  • content - the message content in HTML format.
  • reply_to - an array containing the reply-to address: array('sales@example.com'=>'Sales Department').
  • attachments - an array containing a list of paths to the attachment files.
  • recipients - an array containing a list of recipients: array('demo@example.com'=>'Demo User').
  • from - "from" email address.
  • from_name - "from" name.
  • sender - email sender email address.
  • subject - message subject.
  • data - custom parameters which could be passed by the email sending code.
The event handler should return TRUE in order to prevent the default message sending way. Example event handler:
public function subscribeEvents()
{
  Backend::$events->addEvent('core:onSendEmail', $this, 'send_email');
}

public function send_email($email_info)
{
  //
  // Send the message using the external service
  //

  ...

  //
  // Return TRUE to stop LemonStand from sending the message
  //

  return true;
}