encodeQPphp() public method

Backward compatibility wrapper for an old QP encoding function that was removed.
See also: PHPMailer::encodeQP()
Deprecation: Use encodeQP instead.
public encodeQPphp ( string $string, integer $line_max = 76, boolean $space_conv = false ) : string
$string string
$line_max integer
$space_conv boolean
return string
Example #1
0
 /**
  * Plain quoted-printable message.
  */
 public function testQuotedPrintable()
 {
     $this->Mail->Body = 'Here is the main body';
     $this->Mail->Subject .= ': Plain + Quoted-printable';
     $this->Mail->Encoding = 'quoted-printable';
     $this->buildBody();
     $this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
     //Check that a quoted printable encode and decode results in the same as went in
     $t = file_get_contents(__FILE__);
     //Use this file as test content
     $this->assertEquals($t, quoted_printable_decode($this->Mail->encodeQP($t)), 'Quoted-Printable encoding round-trip failed');
     $this->assertEquals($this->Mail->encodeQP($t), $this->Mail->encodeQPphp($t), 'Quoted-Printable BC wrapper failed');
 }
 /**
  * Plain quoted-printable message.
  */
 public function testQuotedPrintable()
 {
     $this->Mail->Body = 'Here is the main body';
     $this->Mail->Subject .= ': Plain + Quoted-printable';
     $this->Mail->Encoding = 'quoted-printable';
     $this->buildBody();
     $this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
     //Check that a quoted printable encode and decode results in the same as went in
     $t = file_get_contents(__FILE__);
     //Use this file as test content
     //Force line breaks to UNIX-style
     $t = str_replace(array("\r\n", "\r"), "\n", $t);
     $this->assertEquals($t, quoted_printable_decode($this->Mail->encodeQP($t)), 'Quoted-Printable encoding round-trip failed');
     $this->assertEquals($this->Mail->encodeQP($t), $this->Mail->encodeQPphp($t), 'Quoted-Printable BC wrapper failed');
     //Force line breaks to Windows-style
     $t = str_replace("\n", "\r\n", $t);
     $this->assertEquals($t, quoted_printable_decode($this->Mail->encodeQP($t)), 'Quoted-Printable encoding round-trip failed (Windows line breaks)');
 }