/** * Plain quoted-printable message. */ function test_Quoted_Printable() { $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. */ function test_Quoted_Printable() { $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 = substr(file_get_contents(__FILE__), 0, 1024); //Just pick a chunk of this file as test content $this->assertEquals($t, quoted_printable_decode($this->Mail->EncodeQP($t)), 'QP encoding round-trip failed'); //$this->assertEquals($t, quoted_printable_decode($this->Mail->EncodeQPphp($t)), 'Native PHP QP encoding round-trip failed'); //TODO the PHP qp encoder is quite broken }