Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6804343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:27:15+00:00 2026-05-26T19:27:15+00:00

This isn’t exactly exactly a bug because the function still works but if E_ALL

  • 0

This isn’t exactly exactly a bug because the function still works but if E_ALL error reporting is turn on, and I send multiple email request to a mail function, I get this notice and I am not sure if this a problem worth solving or not.

Notice: Only variable references should be returned by reference in /usr/share/pear/Mail/mime.php

When I Google the error, it reports to be a bug that was solved(or should have been) a long time ago. I am not sure this matters, but this is the function the email request are being sent too:

public static function sendEMailSMTP($args = array()) {

        if(self::_hasAdapter(get_class(), __FUNCTION__) )
            return self::_callAdapter(get_class(), __FUNCTION__, $args);

        $args += self::getEmailDefaults();
        $args = self::_applyFilter( get_class(), __FUNCTION__ , $args , array('event'=>'args'));

        if(is_array($args)){

            extract($args);

            $config=pv_getSiteEmailConfiguration();

            if(empty($smtp_username)){
                $smtp_username=$config['smtp_username'];
            }

            if(empty($smtp_password)){
                $smtp_password=$config['smtp_password'];
            }

            if(empty($smtp_host)){
                $smtp_host=$config['smtp_host'];
            }

            if(empty($smtp_port)){
                $smtp_port=$config['smtp_port'];
            }

            require_once "Mail.php";
            require_once 'Mail/mime.php';

            $stmp_info= array (
                'host' => $smtp_host,
                'port' => $smtp_port,
                'auth' => true,
                'username' => $smtp_username,
                'password' => $smtp_password
            );

            $headers = array (
                'From' => $sender,
                'To' => $receiver,
                'Subject' => $subject
            );


            if(!empty($args['carboncopy'])){
                $headers['Cc']=$args['carboncopy'];
                $receiver.=','.$args['carboncopy'];
            }

            if(!empty($args['blindcopy'])){
                $headers['Bcc']=$args['blindcopy'];
                $receiver.=','.$args['blindcopy'];
            }

            if(!empty($args['reply_to'])){
                $headers['Reply-To']=$args['reply_to'];
            }

            if(!empty($args['return_path'])){
                $headers['Return-Path']=$args['return_path'];
            }

            if(!empty($args['errors_to'])){
                $headers['Errors-To']=$args['errors_to'];
            }

            if(!empty($args['message_id'])){
                $headers['Message-ID']=$args['message_id'];
            }

            if(empty($text_message)){
                $text = strip_tags($message);
            } else {
                $text = $text_message;
            }

            if(empty($html_message)){
                $html = $message;
            } else {
                $html= $html_message;
            }

            $mime = new Mail_mime("\n");
            $mime->setTXTBody($text);
            $mime->setHTMLBody($html);
            if(!empty($attachment)){
                if(is_array($attachment)) {
                    foreach($attachment as $file) {
                        if(file_exists($file))
                            $mime->addAttachment($file , PVFileManager::getFileMimeType($file));
                    }//end foreach
                } else {
                    $mime->addAttachment($attachment, PVFileManager::getFileMimeType($attachment));
                }
            }

            $body = $mime->get();
            $headers = $mime->headers($headers);

            $smtp = Mail::factory('smtp', $stmp_info);
            $mail = $smtp->send($receiver, $headers, $body);
            self::_notify(get_class().'::'.__FUNCTION__, $args);
        }

    }//end sendEmailPHPSMTP
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:27:16+00:00Added an answer on May 26, 2026 at 7:27 pm

    It means the Mail/Mime.php library is coded for obsolete php standards, and is most likely doing something like

    $var =& new Obj();
    

    In recent PHP versions, objects are always returned as references, so specifying a reference assignment triggers this warning. It’s not harmful, but is something that should be fixed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This isn't exactly a singleton, but it's close, so I imagine it's common. I
This isn't exactly a development question, but it does affect my productivity! Recently, installing
This isn't a question but I thought I'd start a thread where links to
This isn't my code; I am trying to figure out what exactly this does.
This isn't really a programming question but more about programming and testing tools. Is
This isn't a problem as such, but it's bugging me and I would appreciate
This isn't a very simple question, but hopefully someone has run across it. I
This isn't exactly a programming question exactly. I just want to know what your
This isn't a school assignment or anything, but I realize it's a mostly academic
This isn't really clearly documented, but a shallow search reveals that RIM's RAPC compiler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.