PHP Classes

File: smtp_mail.php

Recommend this page to a friend!
  Classes of Manuel Lemos   MIME E-mail message sending   smtp_mail.php   Download  
File: smtp_mail.php
Role: Auxiliary script
Content type: text/plain
Description: Mail() function emulation using smtp_message_class
Class: MIME E-mail message sending
PHP mailer to compose and send MIME messages
Author: By
Last change: Added a commented example of how to include SASL class library when
authentication is necessary.
Date: 11 years ago
Size: 2,091 bytes


Class file image Download
 * smtp_mail.php
 * @(#) $Header: /opt2/ena/metal/mimemessage/smtp_mail.php,v 1.5 2004/10/05 18:51:09 mlemos Exp $

/* Uncomment when using SASL authentication mechanisms */

$message_object=new smtp_message_class;
$message_object->localhost="localhost"; /* This computer address */
$message_object->smtp_host="localhost"; /* SMTP server address */
$message_object->smtp_direct_delivery=0; /* Deliver directly to the recipients destination SMTP server */
$message_object->smtp_exclude_address=""; /* In directly deliver mode, the DNS may return the IP of a sub-domain of the default domain for domains that do not exist. If that is your case, set this variable with that sub-domain address. */
     * If you use the direct delivery mode and the GetMXRR is not functional, you need to use a replacement function.
$message_object->smtp_user=""; /* authentication user name */
$message_object->smtp_realm=""; /* authentication realm or Windows domain when using NTLM authentication */
$message_object->smtp_workstation=""; /* authentication workstation name when using NTLM authentication */
$message_object->smtp_password=""; /* authentication password */
$message_object->smtp_pop3_auth_host=""; /* if you need POP3 authetntication before SMTP delivery, specify the host name here. The smtp_user and smtp_password above should set to the POP3 user and password */
$message_object->smtp_debug=0; /* Output dialog with SMTP server */
$message_object->smtp_html_debug=1; /* If smtp_debug is 1, set this to 1 to output debug information in HTML */

Function smtp_mail($to,$subject,$message,$additional_headers="",$additional_parameters="")