Tag: itextsharp memorystream

使用ITextSharp从内存流中附加PDF文件时遇到问题

我在附加在内存中创建的PDF文件并将其附加到电子邮件模板时遇到问题。 电子邮件没有任何问题..但没有附件。 我不明白为什么会这样。 这是该过程的完整代码。 ExtendedEmailTemplate emailTemp = new ExtendedEmailTemplate(); emailTemp.FromAddress = “ABC Ltd “; emailTemp.ToAddress = custEmail; emailTemp.Body = “This is an Test Email” emailTemp.IsHTML = true; // getting the memorystream of cretaed PDF file in memory MemoryStream pdfStream = MWProductGuaranteedHelper.CreateProductGuaranteeCertificatePDF(custName, guranteeCode, productName); // getting the MailMessage by passing the memorystream and attach the PDF […]