Lansa Integrator smtpmailservice

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
davidbalansa
Posts: 92
Joined: Mon Feb 01, 2016 10:08 am

Lansa Integrator smtpmailservice

Post 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 11641 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 11641 times
If I display the content of the attachment in a browser it's valid.
Capture3.PNG
Capture3.PNG (21.38 KiB) Viewed 11641 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
BrendanB
Posts: 134
Joined: Tue Nov 24, 2015 10:29 am

Re: Lansa Integrator smtpmailservice

Post 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...
davidbalansa
Posts: 92
Joined: Mon Feb 01, 2016 10:08 am

Re: Lansa Integrator smtpmailservice - RESOLVED

Post 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 11618 times
I changed my code to the following. Where content is passed in as *HTML.
Capture5.PNG
Capture5.PNG (8.79 KiB) Viewed 11618 times
Regards,
David
Post Reply