I face one issue with createAttachment method. This method attached pdf but pdf not open and its size is zero kb.
$html .= " <html> <head> </head> <body> Test pdf </body> </html>"; $attachment = $emailTemp->getMail()->createAttachment($html); $attachment->type = 'application/pdf'; $attachment->filename = 'test.pdf'; $attachment->disposition = Zend_Mime::DISPOSITION_ATTACHMENT; $attachment->encoding = Zend_Mime::ENCODING_BASE64; $emailTemp->send($useremail,$Username,$emailTempVariables);
Please help me ASAP. what is wrong here? I want to attached pdf with custom HTML in magento.