email($params)

Sends an email

  • $params (array)
  • return ($email)

Example

$email = email(array(
  'to'      => 'bastian@getkirby.com',
  'from'    => 'my@email.com',
  'subject' => 'Sending emails with Kirby is easy',
  'body'    => 'Hey! This was really easy!'
));

if($email->send()) {
  echo 'The email has been sent';
} else {
  echo $email->error();
}

Is something missing or incorrect? Edit this page on Github…