Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jul 2014
    Posts
    1
    Plugin Contributions
    0

    Default Cannot send email after upgrade

    Hi,
    I follow the Upgrade instruction "Remove Payment & Shipping Module" before upgrade from v1.5.1. After upgrade, I was trying to install the payment & shipping module. But it came to a blank screen, and I figure out from the error log that there's a PHP Fatal error:

    'PHP Fatal error: Call to undefined method PHPMailer::SetFrom() in /home/domain/public_html/includes/functions/functions_email.php on line 25'

    Sound like the error exist when trying to send email to the default Admin email when there's a change in Configuration. And I can 'Install' the modules once I turn off the email function.

    Any idea on howto fix it? Thanks!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Cannot send email after upgrade

    I'm guessing your /includes/classes/ files and subdirectories may be outdated or didn't upload fully. There were several files added there in v1.5.3, and some of them replaced old versions by the same name. If your uploads didn't complete properly then you'll be missing important components, and thus will get errors such as you mentioned.
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2013
    Location
    Sunny Okanagan
    Posts
    1
    Plugin Contributions
    0

    bug Re: Cannot send email after upgrade

    I just downloaded the official 1.5.3 package, and I can confirm that it has SetFrom in line 254 - kills the contact Us form dead!
    ( functions_email.php in /includes/functions )
    v1.5.3-07192014 is the package I have downloaded - all else appears to be working OK (upgraded from 1.5.1)

    So I commented out that line, and added

    Code:
    	  $mail->From = $from_email_address;
    	  $mail->FromName = $from_email_name;
    this is working fine...

  4. #4
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    Default Re: Cannot send email after upgrade

    Bizarrely I was getting a similar situation when trying to set up payment modules in the admin. When I tried to install a Payment Mod no matter which one, it kept going to a white screen and logging me out.

    Obviously the first place I looked was in the logs/ADMIN DEBUG files and I found this.

    [29-Oct-2014 19:50:54] PHP Fatal error: Call to undefined method PHPMailer::SetFrom() in /MYSERVERPATH/includes/functions/functions_email.php on line 254

    Tried uploading a copy of functions_email.php from a virgin Zen Cart 1.5.3..still no luck!

    So found this thread and made the change as suggested by rockandroller above and it resolved the issue.

    My only concern is, does it cause any security issues in the functions_email.php or any other issues in the 1.5.3 by changing $mail->SetFrom($from_email_address, $from_email_name); to

    $mail->From = $from_email_address;
    $mail->FromName = $from_email_name;

    Would be interested to hear back!
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,974
    Plugin Contributions
    96

    Default Re: Cannot send email after upgrade

    Are you sure that you uploaded the Zen Cart v1.5.3 file /includes/classes/class.phpmailer.php? That module definitely has the SetFrom function defined.

    Additionally, check to make sure that the file /includes/auto_loaders/overrides/config.core.php doesn't exist. If it does, rename it to config.core.php~ and see if that doesn't clear the issue up.
    Last edited by lat9; 29 Oct 2014 at 10:20 PM. Reason: Another idea

  6. #6
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,229
    Plugin Contributions
    6

    red flag Re: Cannot send email after upgrade

    Quote Originally Posted by lat9 View Post
    Are you sure that you uploaded the Zen Cart v1.5.3 file /includes/classes/class.phpmailer.php? That module definitely has the SetFrom function defined.

    Additionally, check to make sure that the file /includes/auto_loaders/overrides/config.core.php doesn't exist. If it does, rename it to config.core.php~ and see if that doesn't clear the issue up.
    No that doesn't exist and includes/classes/class.phpmailer.php is installed. This was a site developed from a clean install of Zen Cart 1.5.3

    It wasn't an upgrade.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

 

 

Similar Threads

  1. Cannot Send Email with IIS 7
    By kcchan in forum General Questions
    Replies: 3
    Last Post: 13 Jun 2009, 03:59 PM
  2. Cannot send email to SOME addresses
    By Rasyr in forum General Questions
    Replies: 2
    Last Post: 12 Dec 2007, 05:05 AM
  3. cannot send email.
    By mundi in forum General Questions
    Replies: 1
    Last Post: 26 Nov 2007, 06:59 PM
  4. Cannot send customers email
    By bhfruitcakeco in forum General Questions
    Replies: 2
    Last Post: 21 Dec 2006, 09:15 PM
  5. Cannot send email after upgrade using local Windows server
    By AcurA in forum Upgrading from 1.3.x to 1.3.9
    Replies: 6
    Last Post: 8 Sep 2006, 09:18 PM

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