Skip to content

Latest commit

 

History

History
28 lines (23 loc) · 546 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 546 Bytes

RockLite

ProcessWire MailerLite Integration

Usage

// RockForms example
public function processInput()
{
  $values = $this->getValues();

  /** @var RockLite $lite */
  $lite = $this->wire->modules->get('RockLite');
  $result = $lite->api()->subscribe(
    mail: $values->mail,
    groups: ['1234'], // your group id
  );
  // bd($result);

  $m = new WireMail();
  $m->from('[email protected]');
  $m->to('[email protected]');
  $m->subject("New signup: {$values->mail}");
  $m->body(print_r($result, true));
  $m->send();
}