PHP Classes

File: cronjob/reply_mails.php

Recommend this page to a friend!
  Classes of Vedanta Barooah   Auto-Responder   cronjob/reply_mails.php   Download  
File: cronjob/reply_mails.php
Role: Application script
Content type: text/plain
Description: Example Script for Console
Class: Auto-Responder
Mail Autoresponder Class
Author: By
Last change: code correction, sorry! :(
Date: 19 years ago
Size: 989 bytes
 

Contents

Class file image Download
#!/usr/bin/php
<?php

# in linux this script needs +x (exec permission)

/* this script will call the autoresponder from the console */

/* customize to your requirements */
$USERNAME='joeward';
$PASSWORD='password';
$RESPONSE_EMAIL='joeward@example.com';
$MAIL_SERVER='mail.example.com';
$SERVER_TYPE='pop' # alternate is imap
$PORT='110'; # 143 for imap
$RESPONSE_TYPE='custom' # alternate is file and url

/* a simple custom autoresponse message! */
$message="Your auto-response message goes here!\r\n";

/* include the class file */
include("../autoresponse.class.php");
/* create a object of the class */
$r=new autoresponse($USERNAME,$PASSWORD,$RESPONSE_EMAIL,$MAIL_SERVER,$SERVER_TYPE,$PORT);
/* connect to the server */
$r->connect();
/* set the response message */
$r->responseContentSource="$message";
/* send the response mails - text mail not purged from the server */
$r->send('custom','text');
/* close the mailbox */
$r->close_mailbox();

?>