Adding a PDF Application to BizTalk Email

I became the owner of an ASP.NET MVC site that uses Biztalk 2013 to solve tasks such as sending emails. I am completely new to biztalk, so I forgive the obvious mistakes in this post.


Quick review

The service is called through the application, and then the orchestration calls the stored procedure in sql db to populate some values ​​for email (including html for email), and then sends the email.

Now I want to add a letter attached to the PDF.

As a test, I added a PDF file to the server, and then I tried to add ActualEmailMsg(SMTP.Attachments) = "C:\\PDFs\\test.pdf"; ActualEmailMsg(SMTP.MessagePartsAttachments) = 2; ActualEmailMsg(SMTP.Attachments) = "C:\\PDFs\\test.pdf"; ActualEmailMsg(SMTP.MessagePartsAttachments) = 2; to the message destination expression form, as suggested in this message , to not. (I also tried the physical path with only 1 "\" as "C: \\ PDFs \ test.pdf", and this did not work)

I ruled out the possibility of canceling the service account in the PDF folder. The letter is sent correctly, but there is no attachment. I do not get errors in the code or in the event viewer on the server, so at this point I do not understand what it could be.

+1
source share
2 answers

After many searches, I found that the problem was with the submit pipeline . This thread has given me the right path.

In the "Send Ports" section of the BizTalk admin console of the application, the send pipeline used its own pipeline, which, it seems to me, was made by the previous owner. I changed it to the β€œPass Thru Transmit” type in the drop-down list and it works now.

+1
source

I use the following template to send letters. I'm not sure, but maybe you need to use the ActualEmailMsg(MIME.FileName) attribute ActualEmailMsg(MIME.FileName) for an email message.

 ActualEmailMsg(MIME.FileName) ="Report_{"+FullFileName+"}.xml"; ActualEmailMsg(SMTP.CC)=ReportNotificationEmailAddress; ActualEmailMsg(SMTP.Subject)="Report Notification Email"; ActualEmailMsg(SMTP.EmailBodyFile) =@ "C:\...\ReportNotificationBody.htm"; ActualEmailMsg(SMTP.Attachments) =@ "C:\..\ReportNotificationBody.png"; ActualEmailMsg (SMTP.EmailBodyTextCharset)="UTF-8"; 
0
source

Source: https://habr.com/ru/post/1300111/


All Articles