public function setBodyParts(array $bodyParts)
    {
        $collection = new EmailBodyPartCollection();

        foreach ($bodyParts as $k => $v) {
            $collection->add($v);
        }

        $this->bodyParts = $collection;

        return $this;
    }
public function setBodyParts(array $bodyParts)
    {
        $collection = new EmailBodyPartCollection();

        foreach ($bodyParts as $k => $v) {
            $collection->add($v);
        }

        $this->bodyParts = $collection;

        return $this;
    }
public function setBodyParts ( array $ bodyParts ) { $ collection = new EmailBodyPartCollection ( ) ; foreach ( $ bodyParts as $ k => $ v ) { $ collection -> add ( $ v ) ; } $ this -> bodyParts = $ collection ; return $ this ; }
Set the body of the email. For a single content-type email, just put one in this array.
It is presumed if you add multiple items to this array then it must be multipart.

For multipart/alternative (multiple versions of the body such as text / html) add in
one body part of type multipart/alternative which has multiple body parts.

@param EmailBodyPart[] $bodyParts

@throws InvalidArgumentException
@return static
Set the body of the email . For a single content - type email just put one in this array . It is presumed if you add multiple items to this array then it must be multipart .