Page 1 of 1

Lansa Integrator smtpmailservice

Posted: Wed May 03, 2023 1:27 pm
by davidbalansa
Hi all,

I am having an issue displaying the email content correctly.

I am using the Lansa Integrator smtpservice to send emails with a large html content (type *html), so passing the body content as a list instead of a parameter.
Capture1.PNG
Capture1.PNG (2.94 KiB) Viewed 11645 times
The emails is sent successfully, but the email body is being delivered as an attachment and not displayed as the body of the email.
Capture2.PNG
Capture2.PNG (23.54 KiB) Viewed 11645 times
If I display the content of the attachment in a browser it's valid.
Capture3.PNG
Capture3.PNG (21.38 KiB) Viewed 11645 times
The content of the email body can be found in the IDE sample code: Reusable Part xUserAccountControl (XUSERACNT) method SendEmailRequest. I am converting the code to use integrator instead of depending on the SendGrid third party service. It's the VL Web Tasks sample application.

Any assistance would be appreciated getting the body to display in the email, instead of an attachment.

Regards,
David

Re: Lansa Integrator smtpmailservice

Posted: Wed May 03, 2023 2:31 pm
by BrendanB
David,

as you can probably imagine, Portalize does something similar...

main difference that i can see is that the command is:

Code: Select all


Def_List Name(#EmailBody) Fields(#BPFJSMSTRING) Type(*WORKING) Entrys(*MAX)

'SEND CONTENT(' + #Content + ') ENCODING(UTF-8)'
Where #Content is *HTML, and #BPFJSMSTRING is defined as *nchar(1024)

so perhaps you just need the encoding part?

If you have Portalize, you can review BPFEmailSendingJSMHanlder (specifically the Send MethodRoutine...

Re: Lansa Integrator smtpmailservice - RESOLVED

Posted: Thu May 04, 2023 10:51 pm
by davidbalansa
Hi Brendan,

Thank you for the code recommendation. The email content list is now appearing in the email and not as an attachment.
Capture4.PNG
Capture4.PNG (29.69 KiB) Viewed 11622 times
I changed my code to the following. Where content is passed in as *HTML.
Capture5.PNG
Capture5.PNG (8.79 KiB) Viewed 11622 times
Regards,
David