Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

PHPMailer Fatal Error

Asked Modified Viewed 2,545 times
W
wafflechunk
W
www.wafflechunks.com/../../images/badges/wafflebadge.png
  • Member, joined since
  • Contributed 60 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions
asked
Member

I'm trying to help a friend out with his PHPFusion site and we're getting the following error when trying to register or after clicking "Send Message" when on contact.php

Quote

Fatal error: Call to undefined method PHPMailer::SetLanguage() in \includes\sendmail_include.php on line 28


snippet from sendmail_include.php, line 28 in red
   require_once INCLUDES."class.phpmailer.php";
   
   $mail = new PHPMailer();
   if (file_exists(INCLUDES."language/phpmailer.lang-".$locale['phpmailer'].".php")) {
[color=#ff0000]      $mail->SetLanguage($locale['phpmailer'], INCLUDES."language/");[/color]
   } else {
      $mail->SetLanguage("en", INCLUDES."language/");
   }


Here's the SetLanguage function in class.phpmailer.php
  function SetLanguage($lang_type, $lang_path = 'language/') {
    if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php')) {
      include($lang_path.'phpmailer.lang-'.$lang_type.'.php');
    } elseif (file_exists($lang_path.'phpmailer.lang-en.php')) {
      include($lang_path.'phpmailer.lang-en.php');
    } else {
      $this->SetError('Could not load language file');
      return false;
    }
    $this->language = $PHPMAILER_LANG;

    return true;
  }
Edited by wafflechunk on 06-08-2009 12:18,
0 replies
There are no post found.

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

W
W
www.wafflechunks.com/../../images/badges/wafflebadge.png
  • Member, joined since
  • Contributed 60 posts on the community forums.
  • Started 7 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet