Help Center Live Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: SMTP setup for HCL  (Read 12856 times)

tommyjohn

  • Not too much to say...
  • *
  • Offline Offline
  • Posts: 36
SMTP setup for HCL
« on: June 23, 2007, 12: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: [Select]
<?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
    • Help Center Live
Re: SMTP setup for HCL
« Reply #1 on: June 23, 2007, 12: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
Re: SMTP setup for HCL
« Reply #2 on: June 23, 2007, 12: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
    • Help Center Live
Re: SMTP setup for HCL
« Reply #3 on: June 23, 2007, 01: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
    • Help Center Live
Re: SMTP setup for HCL
« Reply #4 on: June 24, 2007, 07:40:47 AM »

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

Code: [Select]
<?php
phpinfo
();
?>


I really should add this to HCL, so we can pull up the current config. :)
Logged
how may I help you today?

tommyjohn

  • Not too much to say...
  • *
  • Offline Offline
  • Posts: 36
Re: SMTP setup for HCL
« Reply #5 on: June 24, 2007, 02:12:44 PM »

Sent a PM with the URL.
Logged

HCL Admin

  • Administrator
  • HCL Superstar
  • *****
  • Offline Offline
  • Posts: 882
    • Help Center Live
Re: SMTP setup for HCL
« Reply #6 on: June 24, 2007, 02: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
Re: SMTP setup for HCL
« Reply #7 on: December 01, 2010, 09:11:37 PM »

Sry, I posted the msg mistakenly.
« Last Edit: December 01, 2010, 09:16:13 PM by manubatham20 »
Logged
Pages: [1]   Go Up
 

Page created in 0.165 seconds with 18 queries.