Help Center Live Community
April 23, 2014, 07:43:17 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: SMTP setup for HCL  (Read 11574 times)
tommyjohn
Not too much to say...
*
Offline Offline

Posts: 36


« on: June 23, 2007, 08:23:56 PM »

I am trying to use SMTP in HCL, and I have configured the following page...

/hcl/class/phpmailer/class.phpmailer.php

Here is the config (domains and IDs filtered of course):

Code:
<?php

////////////////////////////////////////////////////

// PHPMailer - PHP email class

//

// Class for sending email using either

// sendmail, PHP mail(), or SMTP.  Methods are

// based upon the standard AspEmail(tm) classes.

//

// Copyright (C) 2001 - 2003  Brent R. Matzelle

//

// License: LGPL, see LICENSE

////////////////////////////////////////////////////



/**

 * PHPMailer - PHP email transport class

 * @package PHPMailer

 * @author Brent R. Matzelle

 * @copyright 2001 - 2003 Brent R. Matzelle

 */

class PHPMailer

{

    
/////////////////////////////////////////////////

    // PUBLIC VARIABLES

    /////////////////////////////////////////////////



    /**

     * Email priority (1 = High, 3 = Normal, 5 = low).

     * @var int

     */

    
var $Priority          3;



    
/**

     * Sets the CharSet of the message.

     * @var string

     */

    
var $CharSet           "iso-8859-1";



    
/**

     * Sets the Content-type of the message.

     * @var string

     */

    
var $ContentType        "text/plain";



    
/**

     * Sets the Encoding of the message. Options for this are "8bit",

     * "7bit", "binary", "base64", and "quoted-printable".

     * @var string

     */

    
var $Encoding          "8bit";



    
/**

     * Holds the most recent mailer error message.

     * @var string

     */

    
var $ErrorInfo         "";



    
/**

     * Sets the From email address for the message.

     * @var string

     */

    
var $From               "[MY EMAIL ADDY]";



    
/**

     * Sets the From name of the message.

     * @var string

     */

    
var $FromName           "[MY NAME]";



    
/**

     * Sets the Sender email (Return-Path) of the message.  If not empty,

     * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.

     * @var string

     */

    
var $Sender            "[MY EMAIL ADDY]";



    
/**

     * Sets the Subject of the message.

     * @var string

     */

    
var $Subject           "";



    
/**

     * Sets the Body of the message.  This can be either an HTML or text body.

     * If HTML then run IsHTML(true).

     * @var string

     */

    
var $Body               "";



    
/**

     * Sets the text-only body of the message.  This automatically sets the

     * email to multipart/alternative.  This body can be read by mail

     * clients that do not have HTML email capability such as mutt. Clients

     * that can read HTML will view the normal Body.

     * @var string

     */

    
var $AltBody           "";



    
/**

     * Sets word wrapping on the body of the message to a given number of 

     * characters.

     * @var int

     */

    
var $WordWrap          0;



    
/**

     * Method to send mail: ("mail", "sendmail", or "smtp").

     * @var string

     */

    
var $Mailer            "smtp";



    
/**

     * Sets the path of the sendmail program.

     * @var string

     */

    
var $Sendmail          "/usr/sbin/sendmail";
    

    
/**

     * Path to PHPMailer plugins.  This is now only useful if the SMTP class 

     * is in a different directory than the PHP include path.  

     * @var string

     */

    
var $PluginDir         "/hcl/class/phpmailer/";



    
/**

     *  Holds PHPMailer version.

     *  @var string

     */

    
var $Version           "1.72";



    
/**

     * Sets the email address that a reading confirmation will be sent.

     * @var string

     */

    
var $ConfirmReadingTo  "";



    
/**

     *  Sets the hostname to use in Message-Id and Received headers

     *  and as default HELO string. If empty, the value returned

     *  by SERVER_NAME is used or 'localhost.localdomain'.

     *  @var string

     */

    
var $Hostname          "";



    
/////////////////////////////////////////////////

    // SMTP VARIABLES

    /////////////////////////////////////////////////



    /**

     *  Sets the SMTP hosts.  All hosts must be separated by a

     *  semicolon.  You can also specify a different port

     *  for each host by using this format: [hostname:port]

     *  (e.g. "smtp1.example.com:25;smtp2.example.com").

     *  Hosts will be tried in order.

     *  @var string

     */

    
var $Host        "localhost";



    
/**

     *  Sets the default SMTP server port.

     *  @var int

     */

    
var $Port        25;



    
/**

     *  Sets the SMTP HELO of the message (Default is $Hostname).

     *  @var string

     */

    
var $Helo        "";



    
/**

     *  Sets SMTP authentication. Utilizes the Username and Password variables.

     *  @var bool

     */

    
var $SMTPAuth     true;



    
/**

     *  Sets SMTP username.

     *  @var string

     */

    
var $Username     "[MY EMAIL ADDY]";



    
/**

     *  Sets SMTP password.

     *  @var string

     */

    
var $Password     "[MY EMAIL PASSWORD]";



    
/**

     *  Sets the SMTP server timeout in seconds. This function will not 

     *  work with the win32 version.

     *  @var int

     */

    
var $Timeout      25;



    
/**

     *  Sets SMTP class debugging on or off.

     *  @var bool

     */

    
var $SMTPDebug    false;



    
/**

     * Prevents the SMTP connection from being closed after each mail 

     * sending.  If this is set to true then to close the connection 

     * requires an explicit call to SmtpClose(). 

     * @var bool

     */

    
var $SMTPKeepAlive false;



    
/**#@+

     * @access private

     */

    
var $smtp            NULL;

    var 
$to              = array();

    var 
$cc              = array();

    var 
$bcc             = array();

    var 
$ReplyTo         = array();

    var 
$attachment      = array();

    var 
$CustomHeader    = array();

    var 
$message_type    "";

    var 
$boundary        = array();

    var 
$language        = array();

    var 
$error_count     0;

    var 
$LE              "\n";

    
/**#@-*/

    
Logged
HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #1 on: June 23, 2007, 08:36:07 PM »

Um, I missed the question....
Logged

how may I help you today?
tommyjohn
Not too much to say...
*
Offline Offline

Posts: 36


« Reply #2 on: June 23, 2007, 08:41:39 PM »

Ummm, its not working, so I guess I meant to ask, is there something in this code I pasted, or elsewhere, that I need to look at?
Logged
HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #3 on: June 23, 2007, 09:32:17 PM »

You might turn on the SMTPdebug on, it'll help you track the errors.
Logged

how may I help you today?
HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #4 on: June 24, 2007, 03:40:47 PM »

Can you put a test-info.php with the following code in it and PM me the URL?

Code:
<?php
phpinfo
();
?>


I really should add this to HCL, so we can pull up the current config. Smiley
Logged

how may I help you today?
tommyjohn
Not too much to say...
*
Offline Offline

Posts: 36


« Reply #5 on: June 24, 2007, 10:12:44 PM »

Sent a PM with the URL.
Logged
HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #6 on: June 24, 2007, 10:15:39 PM »

Everything looks good.  Did you try turning the smtp logging on?  I'm trying to think of some other ways to test that.

That is another part of the code I wish to rewrite, as now that I think about it, it does nothing.
Logged

how may I help you today?
manubatham20
Not too much to say...
*
Offline Offline

Posts: 1


« Reply #7 on: December 02, 2010, 06:11:37 AM »

Sry, I posted the msg mistakenly.
« Last Edit: December 02, 2010, 06:16:13 AM by manubatham20 » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.193 seconds with 19 queries.

Google visited last this page Today at 05:34:43 AM