src/Synapse/Email/AbstractSender.php
protected function injectIntoTrapAddress($address)
    {
        $trapAddress = Arr::path($this->config, 'whitelist.trap');

        if (! $trapAddress) {
            throw new RuntimeException('Email address not whitelisted but no email trap exists');
        }

        $address = str_ireplace('@', '+', $address);

        list($trapName, $trapDomain) = explode('@', $trapAddress);

        return sprintf(
            '%s+%s@%s',
            $trapName,
            $address,
            $trapDomain
        );
    }
protected function injectIntoTrapAddress($address)
    {
        $trapAddress = Arr::path($this->config, 'whitelist.trap');

        if (! $trapAddress) {
            throw new RuntimeException('Email address not whitelisted but no email trap exists');
        }

        $address = str_ireplace('@', '+', $address);

        list($trapName, $trapDomain) = explode('@', $trapAddress);

        return sprintf(
            '%s+%s@%s',
            $trapName,
            $address,
            $trapDomain
        );
    }
protected function injectIntoTrapAddress ( $ address ) { $ trapAddress = Arr :: path ( $ this -> config , 'whitelist.trap' ) ; if ( ! $ trapAddress ) { throw new RuntimeException ( 'Email address not whitelisted but no email trap exists' ) ; } $ address = str_ireplace ( '@' , '+' , $ address ) ; list ( $ trapName , $ trapDomain ) = explode ( '@' , $ trapAddress ) ; return sprintf ( '%s+%s@%s' , $ trapName , $ address , $ trapDomain ) ; }
Return the whitelist trap address with the specified email injected as a suffix

Example:
Email to transform : smith@email.com
Trap email         : foo@bar.com
Result             : foo+smith+email.com@bar.com

@param  string $address Email address to transform
@return string          Transformed address
Return the whitelist trap address with the specified email injected as a suffix