PHP Classes

File: EMailRobot/test/testEMailRobot.php

Recommend this page to a friend!
  Classes of Ilya Nemihin   EMailRobot   EMailRobot/test/testEMailRobot.php   Download  
File: EMailRobot/test/testEMailRobot.php
Role: Example script
Content type: text/plain
Description: test local-script
Class: EMailRobot
E-mail robot, takes letters, parse and forms answe
Author: By
Last change:
Date: 20 years ago
Size: 589 bytes


Class file image Download


example, see description in ../include/EMailRobot/EMailRobot.php


include_once "../include/EMailRobot/EMailRobot.php";

$emailRobot = new EMailRobot();

// file test:
$data = join('', file('email.txt'));
$emailRobot->emailSender->setMode( 'test' );

// real for email-script:
//$stdin = file( "php://stdin" );
//$data = implode( "", $stdin );

$emailRobot->setEMailData( $data );

$emailRobot->emailSender->setHeaders( "Mime-Version: 1.0\nContent-Type: text/plain; charset=Windows-1251\nContent-Transfer-Encoding: 8bit" );