public static function createSpamComplaint(
        $recipientEmailAddress,
        $listExternalId,
        $recipientExternalId = null,
        $ipAddress = '127.0.0.1'
    ) {
        if ($recipientExternalId == null) {
            $recipientExternalId = rand(1, 99999);
        }

        return (new Payload())->setIpAddress($ipAddress)
            ->setAction(Type::SPAM_COMPLAINT)
            ->setCampaignId(rand(1, 99999))
            ->setListExternalId($listExternalId)
            ->setReason(Type::REASON_USER_REQUEST)
            ->setRecipientEmailAddress($recipientEmailAddress)
            ->setHash(md5($recipientEmailAddress))
            ->setRecipientExternalId($recipientExternalId)
            ->setTriggerDate(new \DateTime())
            ->setType(Type::SPAM_COMPLAINT);
    }
public static function createSpamComplaint(
        $recipientEmailAddress,
        $listExternalId,
        $recipientExternalId = null,
        $ipAddress = '127.0.0.1'
    ) {
        if ($recipientExternalId == null) {
            $recipientExternalId = rand(1, 99999);
        }

        return (new Payload())->setIpAddress($ipAddress)
            ->setAction(Type::SPAM_COMPLAINT)
            ->setCampaignId(rand(1, 99999))
            ->setListExternalId($listExternalId)
            ->setReason(Type::REASON_USER_REQUEST)
            ->setRecipientEmailAddress($recipientEmailAddress)
            ->setHash(md5($recipientEmailAddress))
            ->setRecipientExternalId($recipientExternalId)
            ->setTriggerDate(new \DateTime())
            ->setType(Type::SPAM_COMPLAINT);
    }
public static function createSpamComplaint ( $ recipientEmailAddress , $ listExternalId , $ recipientExternalId = null , $ ipAddress = '127.0.0.1' ) { if ( $ recipientExternalId == null ) { $ recipientExternalId = rand ( 1 , 99999 ) ; } return ( new Payload ( ) ) -> setIpAddress ( $ ipAddress ) -> setAction ( Type :: SPAM_COMPLAINT ) -> setCampaignId ( rand ( 1 , 99999 ) ) -> setListExternalId ( $ listExternalId ) -> setReason ( Type :: REASON_USER_REQUEST ) -> setRecipientEmailAddress ( $ recipientEmailAddress ) -> setHash ( md5 ( $ recipientEmailAddress ) ) -> setRecipientExternalId ( $ recipientExternalId ) -> setTriggerDate ( new \ DateTime ( ) ) -> setType ( Type :: SPAM_COMPLAINT ) ; }
Creates a new Emailbidding webhook payload of spam complaint type

@param string $recipientEmailAddress
@param string $recipientExternalId
@param string $listExternalId
@param string $ipAddress

@return Payload
Creates a new Emailbidding webhook payload of spam complaint type