Skip to content

Commit

Permalink
Fix SMTP mail sender format issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nguereza-tony committed Jan 13, 2022
1 parent 5134a1d commit f3e1992
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 25 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"phpmd/phpmd": "@stable",
"phpstan/phpstan": "0.12.x-dev",
"phpunit/phpunit": "^9.5",
"platine-php/test-tools": "1.0.x-dev",
"platine-php/dev": "1.0.x-dev",
"squizlabs/php_codesniffer": "3.*"
},

Expand Down
1 change: 0 additions & 1 deletion src/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
*/
class Mailer
{

/**
* The mail transport instance
* @var TransportInterface
Expand Down
1 change: 0 additions & 1 deletion src/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
*/
class Message implements MessageInterface
{

/**
* End of line char
*/
Expand Down
1 change: 0 additions & 1 deletion src/MessageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
*/
interface MessageInterface
{

/**
* Set sender
* @param string $email
Expand Down
1 change: 0 additions & 1 deletion src/Transport/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
*/
class File implements TransportInterface
{

/**
*
* @var string
Expand Down
1 change: 0 additions & 1 deletion src/Transport/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
*/
class Mail implements TransportInterface
{

/**
* {@inheritedoc}
*/
Expand Down
1 change: 0 additions & 1 deletion src/Transport/NullTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
*/
class NullTransport implements TransportInterface
{

/**
* {@inheritedoc}
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Transport/SMTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
*/
class SMTP implements TransportInterface
{

/**
* End of line char
*/
Expand Down Expand Up @@ -390,7 +389,7 @@ protected function authLogin(): self
*/
protected function mailFrom(): self
{
$command = 'MAIL FROM:<' . $this->message->getFrom() . '>' . self::CRLF;
$command = 'MAIL FROM:' . $this->message->getFrom() . self::CRLF;
$code = $this->sendCommand($command);
if ($code !== 250) {
throw new SMTPRetunCodeException(250, $code, array_pop($this->responses));
Expand Down
1 change: 0 additions & 1 deletion src/Transport/Sendmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
*/
class Sendmail implements TransportInterface
{

/**
*
* @var string
Expand Down
1 change: 0 additions & 1 deletion src/Transport/TransportInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
*/
interface TransportInterface
{

/**
* Send the message
* @return bool
Expand Down
3 changes: 1 addition & 2 deletions tests/MailerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Platine\Mail\Mailer;
use Platine\Mail\Message;
use Platine\Mail\Transport\NullTransport;
use Platine\PlatineTestCase;
use Platine\Dev\PlatineTestCase;

/**
* Mailer class tests
Expand All @@ -18,7 +18,6 @@
*/
class MailerTest extends PlatineTestCase
{

public function testConstructorTransportIsNull()
{
$e = new Mailer();
Expand Down
3 changes: 1 addition & 2 deletions tests/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use org\bovigo\vfs\vfsStream;
use org\bovigo\vfs\vfsStreamFile;
use Platine\Mail\Message;
use Platine\PlatineTestCase;
use Platine\Dev\PlatineTestCase;

/**
* Message class tests
Expand All @@ -19,7 +19,6 @@
*/
class MessageTest extends PlatineTestCase
{

public function testConstructor()
{
$e = new Message();
Expand Down
3 changes: 1 addition & 2 deletions tests/Transport/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Platine\Mail\Exception\MailException;
use Platine\Mail\Message;
use Platine\Mail\Transport\File;
use Platine\PlatineTestCase;
use Platine\Dev\PlatineTestCase;

/**
* File class tests
Expand All @@ -19,7 +19,6 @@
*/
class FileTest extends PlatineTestCase
{

public function testSendDirectoryDoesNotExist(): void
{
global $mock_is_dir_to_false;
Expand Down
3 changes: 1 addition & 2 deletions tests/Transport/MailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Platine\Mail\Message;
use Platine\Mail\Transport\Mail;
use Platine\PlatineTestCase;
use Platine\Dev\PlatineTestCase;

/**
* Mail class tests
Expand All @@ -17,7 +17,6 @@
*/
class MailTest extends PlatineTestCase
{

public function testSend(): void
{
global $mock_mail;
Expand Down
3 changes: 1 addition & 2 deletions tests/Transport/NullTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Platine\Mail\Message;
use Platine\Mail\Transport\NullTransport;
use Platine\PlatineTestCase;
use Platine\Dev\PlatineTestCase;

/**
* NullTransport class tests
Expand All @@ -17,7 +17,6 @@
*/
class NullTransportTest extends PlatineTestCase
{

public function testSend(): void
{
$message = $this->getMockBuilder(Message::class)
Expand Down
3 changes: 1 addition & 2 deletions tests/Transport/SMTPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Platine\Mail\Exception\SMTPSecureException;
use Platine\Mail\Message;
use Platine\Mail\Transport\SMTP;
use Platine\PlatineTestCase;
use Platine\Dev\PlatineTestCase;

/**
* SMTP class tests
Expand All @@ -20,7 +20,6 @@
*/
class SMTPTest extends PlatineTestCase
{

public function testConstructor(): void
{
$host = 'x.x.x.x';
Expand Down
3 changes: 1 addition & 2 deletions tests/Transport/SendmailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Platine\Mail\Exception\MailException;
use Platine\Mail\Message;
use Platine\Mail\Transport\Sendmail;
use Platine\PlatineTestCase;
use Platine\Dev\PlatineTestCase;

/**
* Sendmail class tests
Expand All @@ -18,7 +18,6 @@
*/
class SendmailTest extends PlatineTestCase
{

public function testSendPopenNotExists(): void
{
global $mock_function_exists_to_false;
Expand Down

0 comments on commit f3e1992

Please sign in to comment.