Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Could not instantiate mail function but only for admin settings changes

    Quote Originally Posted by jodean View Post
    Has anyone found a solution to this problem?

    I am not sure what mc means as a work around.
    The field being used to send the notification is the one identified as STORE_OWNER_EMAIL_ADDRESS which is the field associated with Configuration->E-mail Options->E-mail Address (Displayed to Contact you).

    The suggestion was to format the email address so that Zen Cart could break it down. The first part of the text becomes a "name" it can be an email address if you want, but basically is some amount of text to identify a "person". The second part (separated from the first by a space, though not required) is the email address captured between less than and greater than symbols. So if you wanted to say the name was "Store Owner" and the email address were admin @ mydomain . com (spaces added to prevent immediate indexing) then the entry in the field would be:

    Store Owner < admin @ mydomain . com>

    Again with the spaces removed from within <>

    Now whether that constant is the correct one or not can be debated, but the description for both fields (E-mail Address (To Contact You) and E-Mail Address (Sent FROM)) neither describes completing the address as described in this post.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #12
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Could not instantiate mail function but only for admin settings changes

    I think @vaslit's solution is closer to what should really be done. If the second parameter to zen_mail is STORE_OWNER_EMAIL_ADDRESS, the first parameter should be blank or STORE_NAME. I submitted a PR to 1.5.7 to this effect.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #13
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: Could not instantiate mail function but only for admin settings changes

    by the time I got any answers, I was long past that particular client so was never able to put any of the suggestions above into play. If I could just remember which website it was......
    The full-time Zen Cart Guru. WizTech4ZC.com

  4. #14
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Could not instantiate mail function but only for admin settings changes

    Fix accepted into 1.5.7, easy backport for other 1.5.x versions.
    https://github.com/zencart/zencart/pull/2655
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #15
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,296
    Plugin Contributions
    22

    Default Re: Could not instantiate mail function but only for admin settings changes

    I uploaded the files (I downloaded 1.5.7 on the 30th) but the three fixed files did not stop the issue in admin - this is 1.5.6a.
    The full-time Zen Cart Guru. WizTech4ZC.com

  6. #16
    Join Date
    May 2011
    Location
    Tennessee
    Posts
    377
    Plugin Contributions
    0

    Default Re: Could not instantiate mail function but only for admin settings changes

    Check the file admin\modules.php. Searched for STORE_OWNER_EMAIL_ADDRESS its on different lines on different versions. The first argument of the function zen_mail is STORE_OWNER_EMAIL_ADDRESS. As intended, the first argument should be the name of the recipient of the email not the email address. For some reason, when an email is sent to this function it fails. So I changed the STORE_OWNER_EMAIL_ADDRESS to the STORE_OWNER on all three instances mentioned above and it worked just fine.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Could not instantiate mail function
    By yenmax in forum General Questions
    Replies: 6
    Last Post: 7 Dec 2010, 09:50 PM
  2. Replies: 15
    Last Post: 3 Sep 2009, 09:48 AM
  3. Replies: 1
    Last Post: 10 Jul 2009, 12:25 AM
  4. Could not instantiate mail function
    By joro2002 in forum General Questions
    Replies: 0
    Last Post: 20 Feb 2008, 03:03 PM
  5. Could not instantiate mail function
    By stage in forum General Questions
    Replies: 1
    Last Post: 10 Aug 2007, 04:50 AM

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