Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2013
    Location
    USA
    Posts
    3
    Plugin Contributions
    0

    Default PHP Email Not working. Can Not Reset Customer Password From Admin Add Customer page.

    I need some help badly.
    A couple of days ago when trying to reset a customer password from admin add customer I started getting this error. I can not send any emails from admin as well. This has been working for almost a year until a few days ago. I am running Zen Cart 1.5.1 on a Godaddy sever. I contacted GoDaddy and they did php mailer server test and said that was ok.
    Server OS: Linux 2.6.32-358.18.1.el6.nfsfixes.x86_64 Database: MySQL 5.0.96-log
    Server Date: 04/01/2014 19:17:27 Database Date: 04/01/2014 19:17:27
    Server Up Time: 19:17:27 up 88 days, 8:50, 0 users, load average: 5.78, 5.96, 5.85 HTTP Server: Apache
    PHP Version: 5.2.17 (Zend: 2.2.0) PHP Memory Limit: 64M PHP Safe Mode: Off
    PHP File Uploads: On Max Size: 32M POST Max Size: 33M
    Database Data Size: 1,824 kB Database Index Size: 783 kB


    [01-Apr-2014 18:53:07] PHP Fatal error: Class 'PHPMailer' not found in /home/content/05/10437005/html/MYAdmin/includes/functions/functions_email.php on line 174

    Here are some of the lines of my functions_email.php

    // handling admin/"extra"/copy emails:
    if (ADMIN_EXTRA_EMAIL_FORMAT == 'TEXT' && substr($module,-6)=='_extra') {
    $email_html=''; // just blank out the html portion if admin has selected text-only
    }
    //determine what format to send messages in if this is an admin email for newsletters:
    if ($customers_email_format == '' && ADMIN_EXTRA_EMAIL_FORMAT == 'HTML' && in_array($module, array('newsletters', 'product_notification')) && isset($_SESSION['admin_id'])) {
    $customers_email_format = 'HTML';
    }

    // special handling for XML content
    if ($module == 'xml_record') {
    $email_html = '';
    $customers_email_format ='TEXT';
    }

    //notifier intercept option
    $zco_notifier->notify('NOTIFY_EMAIL_AFTER_EMAIL_FORMAT_DETERMINED');

    // now lets build the mail object with the phpmailer class
    174 $mail = new PHPMailer();
    $lang_code = strtolower(($_SESSION['languages_code'] == '' ? 'en' : $_SESSION['languages_code'] ));
    $mail->SetLanguage($lang_code, DIR_FS_CATALOG . DIR_WS_CLASSES . 'support/');
    $mail->CharSet = (defined('CHARSET')) ? CHARSET : "iso-8859-1";
    $mail->Encoding = (defined('EMAIL_ENCODING_METHOD')) ? EMAIL_ENCODING_METHOD : "7bit";
    if ((int)EMAIL_SYSTEM_DEBUG > 0 ) $mail->SMTPDebug = (int)EMAIL_SYSTEM_DEBUG;
    $mail->WordWrap = 76; // set word wrap to 76 characters
    // set proper line-endings based on switch ... important for windows vs linux hosts:
    $mail->LE = (EMAIL_LINEFEED == 'CRLF') ? "\r\n" : "\n";

    switch (EMAIL_TRANSPORT) {
    case 'smtp':
    $mail->IsSMTP();
    $mail->Host = trim(EMAIL_SMTPAUTH_MAIL_SERVER);
    if (EMAIL_SMTPAUTH_MAIL_SERVER_PORT != '25' && EMAIL_SMTPAUTH_MAIL_SERVER_PORT != '') $mail->Port = trim(EMAIL_SMTPAUTH_MAIL_SERVER_PORT);
    $mail->LE = "\r\n";
    break;
    case 'smtpauth':
    $mail->IsSMTP();
    $mail->SMTPAuth = true;
    $mail->Username = (zen_not_null(EMAIL_SMTPAUTH_MAILBOX)) ? trim(EMAIL_SMTPAUTH_MAILBOX) : EMAIL_FROM;
    $mail->Password = trim(EMAIL_SMTPAUTH_PASSWORD);
    $mail->Host = trim(EMAIL_SMTPAUTH_MAIL_SERVER);
    if (EMAIL_SMTPAUTH_MAIL_SERVER_PORT != '25' && EMAIL_SMTPAUTH_MAIL_SERVER_PORT != '') $mail->Port = trim(EMAIL_SMTPAUTH_MAIL_SERVER_PORT);
    $mail->LE = "\r\n";
    //set encryption protocol to allow support for Gmail or other secured email protocols
    if (EMAIL_SMTPAUTH_MAIL_SERVER_PORT == '465' || EMAIL_SMTPAUTH_MAIL_SERVER_PORT == '587' || EMAIL_SMTPAUTH_MAIL_SERVER == 'smtp.gmail.com') $mail->Protocol = 'ssl';
    if (defined('SMTPAUTH_EMAIL_PROTOCOL') && SMTPAUTH_EMAIL_PROTOCOL != 'none') {
    $mail->Protocol = SMTPAUTH_EMAIL_PROTOCOL;
    if (SMTPAUTH_EMAIL_PROTOCOL == 'starttls' && defined('SMTPAUTH_EMAIL_CERTIFICATE_CONTEXT')) {
    $mail->Starttls = true;
    $mail->Context = SMTPAUTH_EMAIL_CERTIFICATE_CONTEXT;
    }
    }

    Name:  functions_email.php.jpg
Views: 688
Size:  57.6 KB

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PHP Email Not working. Can Not Reset Customer Password From Admin Add Customer pa

    Does the file /includes/classes/class.phpmailer.php exist?

  3. #3
    Join Date
    Apr 2013
    Location
    USA
    Posts
    3
    Plugin Contributions
    0

    Default Re: PHP Email Not working. Can Not Reset Customer Password From Admin Add Customer pa

    Thanks very much for your help.
    It does not appear in either of the /includes/classes/ folders.
    Where can I get it?
    Thanks

  4. #4
    Join Date
    Apr 2013
    Location
    USA
    Posts
    3
    Plugin Contributions
    0

    Default Re: PHP Email Not working. Can Not Reset Customer Password From Admin Add Customer pa

    Thanks man, you are a genius. That took care of the problem. I have no idea why it was missing.
    I found it in one of my backups and added it, now all is well.
    Thanks again and again.

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PHP Email Not working. Can Not Reset Customer Password From Admin Add Customer pa

    Quote Originally Posted by too confused View Post
    Thanks man, you are a genius.
    I wish :)

    Quote Originally Posted by too confused View Post
    That took care of the problem.
    I have no idea why it was missing.
    I found it in one of my backups and added it, now all is well.
    Thanks again and again.
    I'm glad you found it. Saves me the trouble of telling you where to find it. <g>

    At this stage in may be prudent to perform a file comparison with the ZenCart distribution files just in case other files are missing. You may not notice other issues yourself and you can't rely on you customers to report any problems they experience to you.

    Cheers
    RodG

 

 

Similar Threads

  1. v155 Customer Password Reset Not working
    By shohensee in forum General Questions
    Replies: 20
    Last Post: 7 Jun 2019, 12:59 PM
  2. Reset customer password from admin
    By romanus in forum All Other Contributions/Addons
    Replies: 58
    Last Post: 23 Dec 2016, 07:05 PM
  3. v154 Forgotten Password Email Not Working for Customer
    By sparrowce in forum General Questions
    Replies: 6
    Last Post: 8 Aug 2015, 07:28 PM
  4. v150 Customer password reset email not arriving
    By rhs49010 in forum General Questions
    Replies: 10
    Last Post: 24 Aug 2012, 02:28 AM
  5. Password not showing in Customer Password Reset Email
    By izuno in forum General Questions
    Replies: 2
    Last Post: 7 Oct 2008, 04:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR