Im trying to send email using transportbuilder but I'm getting this error.
Exception #0 (Magento\Framework\Exception\MailException): No body specified Exception #1 (Zend_Mail_Transport_Exception): No body specified
The template is already in and everything is already put in. Im using the following code to send email.
$transport = $this->_transportBuilder->setTemplateIdentifier($templateId)
->setTemplateOptions(['area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, 'store' => $storeId])
->setTemplateVars($vars)
->setFrom($sender)
->addTo($email, $name)
->getTransport();
$transport->sendMessage();
Can anyone help me on this.