Skip to content
Simple PHP class for sending emails including amp4email version.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


  require './phpmail4amp.php';

  $ampmail = new PHPmail4AMP;
  $ampmail->sendFrom('', 'Sender name');
  $ampmail->sendTo('', 'Recipient Name');
  $ampmail->subject   = 'Email with AMP version';
  $ampmail->mailText  = 'Hello world in Text!';
  $ampmail->mailHTML  = 'Helo world in <strong>HTML</strong>!';
  $ampmail->mailAMP   = '<!doctype html>
      <html amp4email>
        <meta charset="utf-8">
        <style amp4email-boilerplate>body{visibility:hidden}</style>
        <script async src=""></script>
        Hello world in AMP!
  if($ampmail->send()) {
    // success
  } else {
    // failed
You can’t perform that action at this time.