Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25
  1. #11
    Join Date
    May 2005
    Posts
    41
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    Quote Originally Posted by DrByte View Post
    What do you have set for your Admin->Configuration->Email Options->Contact us Pulldown? What happens if you leave it blank?
    Nothing. It is blank.
    The same error also appears when the system wants to send an order confirmation etc, not only at Contact Us.

  2. #12
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Could not instatiate mail function

    What version of Zen Cart?
    .

    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. #13
    Join Date
    May 2005
    Posts
    41
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    Zen Cart 1.3.7.1
    Database Patch Level: 1.3.7.1
    v1.3.7.1 [2007-10-08 04:21:09] (Fresh Installation)

    PHP Version 4.4.7

    I know there is a newer version out, but I was hoping to get around having to upgrade as the cart is t quite customized. I was careful to use overrides whereever I could, but I'm still a bit iffy. Never upgraded before.
    Last edited by dude_s; 7 Dec 2007 at 02:23 AM.

  4. #14
    Join Date
    May 2005
    Posts
    41
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    Nobody has an idea?

  5. #15
    Join Date
    Oct 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    I get this error message when the system wants to send an order confirmation, but from Contact Us everything is working fine and the emails are ariving.

    Any ideas?

    I use PHP, because I'm having trouble setting up smpt/smtpauth for my hosting provider.

  6. #16
    Join Date
    Sep 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    Hi All,

    I've recently installed Zen 1.3.8a on Linux and while testing the mail transaction
    to Nochex pay services PHP threw this:
    Email Error: Could not instantiate mail function.

    So I thought I'd apply a couple of checks.

    1. Invoking the following script ...

    <?php
    $title = 'Title Test';
    $content = 'Content Test';
    $to = 'myselff@my_address.com';
    $from='admin@my_shop_domain.com';
    mail($to, $title, $conten, 'FROM:'.$from.'\n) or die("Error trying to send mail");
    ?>

    from Zen Carts root creates the desired effect ... the test mail arrives in my
    pesonal mailbox. This proves that the undelying mail transport (PHP), on my
    hosting service, functions.

    2. Go into zen admin and send a private email to a customer, my_self@my_address.com
    This works as well, proving that Zen's interaction with the PHP mail transport
    layer is OK.

    After taking a look at this site: http://uk3.php.net/function.mail
    I see that, if any of the passed arguments strings to PHP's mail() function is
    ill-constructed or port/protocl settings are wrong PHP will barf with, guess what!
    Error: Could not instantiate mail function.

    I decided that this now puts the onus on the email addresses defined in admin,
    although they look OK, or the 'nochex_apc_handler.php' configuration settings.

    So, I'm now examining as to where in the code that this issue occurs. If anyone
    beats me to it or knows the real solution or has any other thoughts on this matter
    please tell us all. If I find it then I definitely will. Please note, suggesting
    another mail transport setting such as sendmail doesn't fix the issue.
    Mac
    ---
    There is no way to happiness. HAPPINESS is the way.

  7. #17
    Join Date
    Oct 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    Please note, suggesting
    another mail transport setting such as sendmail doesn't fix the issue.

    Absolutely, as I mentioned above PHP works for me everywhere except when sending confirmation email to the customer after checkout, and a copy to the admin (me). The problem is exactly what you've said, if I can find the line(s) in the code, I will write asap.

    Btw I ditched Zen and switched to osc, I couldn't handle with it. :)

    Cheers

  8. #18
    Join Date
    Sep 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    OK peeps,

    I''ll tell you I've found out so far and what I've done about it. I'm not saying
    the issue has gone away yet but now Nochex receives whats being sent, whatever
    that is because is complains with a wrong "email address" or "Merchant ID". But
    that should be fixable.

    Fistly, I examined the code /include/classes/class.phpmailer.php. The first thing
    that struck me was - it's old and it really shouldn't be sitting ontop of PHP 5.x.x.
    Your host is using PHP 5.x.x aren't they, perhaps you should move.

    Anyway I went here; phpmailer.codeworxtech.com/index.php
    and downloaded PHPMailer for PHP5/6 and unzipped/tar'd them into a tempory directory.

    Secondly, after doing a few eyeball checks (I'm not that cavalier), I did
    this ...
    1. replaced - /include/classes/class.phpmailer.php
    2. replaced - /include/classes/class.smtp.php
    3. added - /include/classes/class.pop3.php

    also in /include/classes/support/ I replaced all the language files provided
    in the download. Although I only needed the English one, I like to be consistant.

    Now, as I said, more testing is required on the PHP side before I'm satisfied and
    it's unlikely I'll be using SMPT so I won't be testing that. Perhaps someone
    else who requires SMPT would undertake that and provide some feedback for others
    who might want to use it

    As for myself, when I'm satisfied with my testing I'll tell you here whether
    its broken anywhere or that its all OK.

    Cheers All.
    Mac
    ---
    There is no way to happiness. HAPPINESS is the way.

  9. #19
    Join Date
    Sep 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    This issue could be as simple as a malformed email in the Configuration>E-Mail Options in the "Send Copy of Order Confirmation Emails To" section. The email need to be - Name 1 <email@address1>, Name 2 <email@address2> (if you have more than one)

  10. #20
    Join Date
    Nov 2008
    Posts
    16
    Plugin Contributions
    0

    Default Re: Could not instatiate mail function

    Quote Originally Posted by DrByte View Post
    Usually such "sudden" malfunctions are a result of changes to your server, made by your hosting company.
    "Email Error: Could not instantiate mail function."

    i just got this message after sending a whole bunch of newsletters out. i have myself in the contact list so i can verify everything and i did get mine. obviously, i can't check everyone else's email to see if it went through so how would i konw if everyone received theirs?

    just to make sure i'm clear, the screen filled up w/ a bunch of green checkmarks indicating sent mail, and toward the end of the page, the error message popped up.

    i'm wondering if i "overloaded" the mail server somehow? i haven't looked at the code but it looks like the newsletter opens and closes the mail() function over and over again for each iteration/record (rather than just sending out one big BCC email). is that the case? and is it possible that half my emails went out and the other half "crapped out" before completing?

    any advice would be great. thx.

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Could not instantiate mail function
    By veronicathecow in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 16 Nov 2011, 06:52 PM
  2. Could not instantiate mail function
    By yenmax in forum General Questions
    Replies: 6
    Last Post: 7 Dec 2010, 09:50 PM
  3. Could not instatiate mail function
    By pixelpadre in forum General Questions
    Replies: 17
    Last Post: 29 Apr 2010, 05:25 PM
  4. Could not instantiate mail function
    By hookah in forum General Questions
    Replies: 1
    Last Post: 21 Dec 2009, 09:32 AM
  5. Could not instantiate mail function
    By stage in forum General Questions
    Replies: 1
    Last Post: 10 Aug 2007, 04:50 AM

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