Email attachments

$10.00
In stock
SKU
Email attachments

This extension adds possibility to attach files to emails in magento 2

Links

This extension adds possibility to attach files to emails in magento 2

Example for contact form:
Make preference for Magento\Contact\Model\Mail

$transport = $this->transportBuilder
->setTemplateIdentifier($this->contactsConfig->emailTemplate())
->setTemplateOptions(
[
'area' => Area::AREA_FRONTEND,
'store' => $this->storeManager->getStore()->getId()
]
)
->setTemplateVars($variables)
->setFrom($this->contactsConfig->emailSender())
->addTo($this->contactsConfig->emailRecipient())
->addAttachment($file_path, $fileName)
->setReplyTo($replyTo, $replyToName)
->getTransport();
$transport->sendMessage();
Write Your Own Review
You're reviewing:Email attachments
Copyright © 2020 konatsu.pl All rights reserved.