#!/usr/bin/php parent::ARGS, ["-t", "--to", "args" => 1, "action" => "--add", "name" => "to"], ["-c", "--cc", "args" => 1, "action" => "--add", "name" => "cc"], ["-b", "--bcc", "args" => 1, "action" => "--add", "name" => "bcc"], ["-F", "--from", "args" => 1, "name" => "from"], ["args" => 2, "name" => "args"], ]; protected $to, $cc, $bcc, $from; protected $args; function main() { $subject = $this->args[0]; $body = $this->args[1]; mailer::send($this->to, $subject, $body, $this->cc, $this->bcc, $this->from); } });