Skip to main content
16 events
when toggle format what by license comment
Jun 25, 2019 at 6:01 comment added Dinesh Rajput I wish I could do that, I am currently blocked for answering by stackexchange.
Jun 25, 2019 at 5:39 comment added Magento2 Devloper please put your solution in Answer area so you can get reputation.
Jun 24, 2019 at 11:40 comment added Dinesh Rajput Finally I have made it. Let me add here quick that can help someone. In your TransportBuilder.php file:public function addAttachment($content, $fileName, $fileType){$this->message->setBodyAttachment($content, $fileName, $fileType);return $this;} ,Now setBodyAttachment function is defined with 3 params in Message.php public function setBodyAttachment($content, $fileName, $fileType) In your Action(controller): use this $this->_transportBuilder->->addAttachment(file_get_contents($filePath), $fileName, $fileType)
Jun 24, 2019 at 11:22 comment added Magento2 Devloper Magento2.3 createAttachment() removed this method
Jun 24, 2019 at 11:07 comment added Dinesh Rajput Not working for Magento2.3 createAttachment()
Jun 24, 2019 at 11:01 comment added Dinesh Rajput Hello @SohelRana, I have tried above code, It throws error of undefined method:Fatal error: Uncaught Error: Call to undefined method Vendor\Module\Mail\Message\Interceptor::createAttachment() in
Jun 24, 2019 at 9:45 comment added Sohel Rana yes, exactly...
Jun 24, 2019 at 9:41 comment added Magento2 Devloper $this->transportBuilder->addAttachment(file_get_contents($_FILES['attach']['tmp_name']), $_FILES['attach']['type'], null, null, $_FILES['attach']['name']); this code?
Jun 24, 2019 at 9:37 comment added Sohel Rana simply just call multiple times like the example I posted.
Jun 24, 2019 at 9:36 comment added Magento2 Devloper Yes multiple attachments
Jun 24, 2019 at 9:27 comment added Sohel Rana multiple attachments?
Jun 24, 2019 at 9:23 comment added Magento2 Devloper Hello @Sohel Rana. is that possible to multiple files import in current code? how? can you please share?
Jun 24, 2019 at 9:10 comment added Sohel Rana check updated answer
Jun 24, 2019 at 9:07 history edited Sohel Rana CC BY-SA 4.0
added 843 characters in body
Jun 24, 2019 at 8:48 comment added Dinesh Rajput I have edited my question with full code.
Jun 24, 2019 at 6:10 history answered Sohel Rana CC BY-SA 4.0