Completed
Push — master ( 2bee40...1e6e9e )
by Joao
02:19
created

PHPMailerOverride::getFullMessageEnvelope()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace ByJG\Mail\Override;
4
5
class PHPMailerOverride extends \PHPMailer
6
{
7
    public function getFullMessageEnvelope()
8
    {
9
        $parts = $this->getMessageEnvelopeParts();
10
11
        return $parts['header'] . $parts['body'];
12
    }
13
14
    public function getMessageEnvelopeParts()
15
    {
16
        if (!$this->preSend()) {
17
            throw new \Exception('Invalid Format Message');
18
        }
19
20
        return ["header" => $this->MIMEHeader, "body" => $this->MIMEBody];
21
    }
22
}
23