Skip to main content
added 181 characters in body
Source Link
Dominic Pixie
  • 7.6k
  • 4
  • 20
  • 59

You will need to extend the framework.

Each email needs to be individually added as a destination address.

I do this for CC address in this extension

https://github.com/DominicWatts/EmailCC/blob/master/Plugin/Magento/Framework/Mail/Template/TransportBuilder.php#L51

There isn't a quick and easy method I can show you

https://github.com/magento/magento2/blob/2.3-develop/lib/internal/Magento/Framework/Mail/Message.php#L118-L122

public function addTo($toAddress)
{
    $this->zendMessage->addTo($toAddress);
    return $this;
}

You'd need to adapt something like this https://github.com/DominicWatts/ContactAttachment/blob/master/Rewrite/Magento/Contact/Controller/Index/Post.php#L215

Or you can use something like this

https://www.magenticity.com/contact-inquiry-manager-magento2.html

Might be more cost effective/easier for you

Update

I created an extension

https://github.com/DominicWatts/ContactCc

Not as clean as I would like but you can see I build different sends based on configuration.

You will need to extend the framework.

Each email needs to be individually added as a destination address.

I do this for CC address in this extension

https://github.com/DominicWatts/EmailCC/blob/master/Plugin/Magento/Framework/Mail/Template/TransportBuilder.php#L51

There isn't a quick and easy method I can show you

https://github.com/magento/magento2/blob/2.3-develop/lib/internal/Magento/Framework/Mail/Message.php#L118-L122

public function addTo($toAddress)
{
    $this->zendMessage->addTo($toAddress);
    return $this;
}

You'd need to adapt something like this https://github.com/DominicWatts/ContactAttachment/blob/master/Rewrite/Magento/Contact/Controller/Index/Post.php#L215

Or you can use something like this

https://www.magenticity.com/contact-inquiry-manager-magento2.html

Might be more cost effective/easier for you

You will need to extend the framework.

Each email needs to be individually added as a destination address.

I do this for CC address in this extension

https://github.com/DominicWatts/EmailCC/blob/master/Plugin/Magento/Framework/Mail/Template/TransportBuilder.php#L51

There isn't a quick and easy method I can show you

https://github.com/magento/magento2/blob/2.3-develop/lib/internal/Magento/Framework/Mail/Message.php#L118-L122

public function addTo($toAddress)
{
    $this->zendMessage->addTo($toAddress);
    return $this;
}

You'd need to adapt something like this https://github.com/DominicWatts/ContactAttachment/blob/master/Rewrite/Magento/Contact/Controller/Index/Post.php#L215

Or you can use something like this

https://www.magenticity.com/contact-inquiry-manager-magento2.html

Might be more cost effective/easier for you

Update

I created an extension

https://github.com/DominicWatts/ContactCc

Not as clean as I would like but you can see I build different sends based on configuration.

Source Link
Dominic Pixie
  • 7.6k
  • 4
  • 20
  • 59

You will need to extend the framework.

Each email needs to be individually added as a destination address.

I do this for CC address in this extension

https://github.com/DominicWatts/EmailCC/blob/master/Plugin/Magento/Framework/Mail/Template/TransportBuilder.php#L51

There isn't a quick and easy method I can show you

https://github.com/magento/magento2/blob/2.3-develop/lib/internal/Magento/Framework/Mail/Message.php#L118-L122

public function addTo($toAddress)
{
    $this->zendMessage->addTo($toAddress);
    return $this;
}

You'd need to adapt something like this https://github.com/DominicWatts/ContactAttachment/blob/master/Rewrite/Magento/Contact/Controller/Index/Post.php#L215

Or you can use something like this

https://www.magenticity.com/contact-inquiry-manager-magento2.html

Might be more cost effective/easier for you