Re: Variable Scope problem passing function parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



metastable wrote:
Jim McIntyre wrote:
    $phpMail = new PHPMailer();
    $phpMail->From = $from;
    $phpMail->AddAddress($this->to);
    $phpMail->Subject = $subject;
    $phpMail->Body = $body;
    return $phpMail->Send();

$this -> to

it has no meaning in the scope of your class.

Apparently, neither do the other variable names. If I replace that with a string containing my email address, it sends an email... but everything else in the email is blank - no body, no subject, etc.

How do I reference the arguments passed to the function when setting properties or calling methods of the instance of PHPMailer?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux