PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Peter Kahl   Tiny Mailer   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Tiny Mailer
Compose and send email messages with mail function
Author: By
Last change: Usage example
Date: 4 years ago
Size: 1,139 bytes
 

Contents

Class file image Download

Tiny Mailer ?? ????????? ??????

Downloads License If this project has business value for you then don't hesitate to support me with a small donation.

Light-weight PHP mailer that uses the mail() function. Plain text only. Nothing fancy. UTF-8 capable.

Usage Example

use peterkahl\tinyMailer\tinyMailer;

$body = '???? Jane,
I am so happy to use this simple mailer.
John Roe';

$arr = array(
  'sendto-name' => 'Jane Doe',
  'sendto-mail' => 'jane.doe@destination.whatever',
  'from-name'   => 'John Roe',
  'from-mail'   => 'john.roe@origin.whatever',
  'message-txt' => $body,
  'subject'     => 'Some subject text ?????',
);

$id = tinyMailer::send($arr);

if ($id === false) {
  echo 'Failed';
}
else {
  echo 'Successfuly sent message with ID '. $id;
}