public function sendRawEmail($raw_data, $dest=[]) 
    {
        //force base64 encoding on v2 Api
        if ($this->isVersion2() && base64_decode($raw_data, true)===false)
            $raw_data = base64_encode($raw_data);
        
        $mail = [
            //'FromArn' => '<string>',
            'Source'                => $this->from, // REQUIRED
            //'SourceArn' => '<string>',
            'RawMessage'            => ['Data' => $raw_data],
            //'ReturnPathArn' => '<string>',
        ];

        // override destinations
        if ($dest)
            $mail['Destinations'] = $dest;
        
        if ($this->tags)
            $mail['Tags'] = $this->buildTags();

        return $this->invokeMethod("sendRawEmail", $mail, true);
    }
public function sendRawEmail($raw_data, $dest=[]) 
    {
        //force base64 encoding on v2 Api
        if ($this->isVersion2() && base64_decode($raw_data, true)===false)
            $raw_data = base64_encode($raw_data);
        
        $mail = [
            //'FromArn' => '<string>',
            'Source'                => $this->from, // REQUIRED
            //'SourceArn' => '<string>',
            'RawMessage'            => ['Data' => $raw_data],
            //'ReturnPathArn' => '<string>',
        ];

        // override destinations
        if ($dest)
            $mail['Destinations'] = $dest;
        
        if ($this->tags)
            $mail['Tags'] = $this->buildTags();

        return $this->invokeMethod("sendRawEmail", $mail, true);
    }
public function sendRawEmail ( $ raw_data , $ dest = [ ] ) { //force base64 encoding on v2 Api
 if ( $ this -> isVersion2 ( ) && base64_decode ( $ raw_data , true ) === false ) $ raw_data = base64_encode ( $ raw_data ) ; $ mail = [ //'FromArn' => '<string>',
 'Source' => $ this -> from , // REQUIRED
 //'SourceArn' => '<string>',
 'RawMessage' => [ 'Data' => $ raw_data ] , //'ReturnPathArn' => '<string>',
 ] ; // override destinations
 if ( $ dest ) $ mail [ 'Destinations' ] = $ dest ; if ( $ this -> tags ) $ mail [ 'Tags' ] = $ this -> buildTags ( ) ; return $ this -> invokeMethod ( "sendRawEmail" , $ mail , true ) ; }
Send raw email. Beware of differences between Api v2 and v3

@param string $raw_data mail in raw format (string|resource|Psr\Http\Message\StreamInterface)
@param array $dest destinations in this format:
["To => [...], "Cc => [...], "Bcc" => [...]]
- Mandatory in v2!
- DO NOT SPECIFIY in v3 unless you want to override raw headers!
@return mixed Aws\Result (or Promise for async version)
@throws Aws\Exception
Send raw email . Beware of differences between Api v2 and v3