My Oracle Support Banner

E-PC: Email Text Sent With Application Class PT_MCF_MAIL:MCFOutboundEmail Send() Method Ignores New Lines When ContentType = "text/html" (Doc ID 2435677.1)

Last updated on AUGUST 15, 2018

Applies to:

PeopleSoft Enterprise PT PeopleTools - Version 8.55 and later
Information in this document applies to any platform.

Symptoms

On : 8.55 version, PeopleCode

Email Text Sent With Application Class PT_MCF_MAIL:MCFOutboundEmail Send() Method Ignores New Lines When ContentType = "text/html"

To Replicate:

1) Write PeopleCode using Application Class PT_MCF_MAIL:MCFOutboundEmail to send email.
2) Get the email text using PeopleCode Function MsgGetExplainText. The message catalog entry must contain new lines.
3) Execute the code in PIA and note that the email that is sent ignores the new lines.

 

Example:

Message Catalog Entry:
Message Set: 3
Message Nbr: 9999
Message Text: Testing %1
Message Description:
Test Purchase Order # %1

Please EMAIL Purchase Order confirmation before 1:00pm Eastern Time to:

POs beginning 'ZZZ' or 'YYY' to somemail@email.com
All other POs - to someothermail@email.com

For Product Orders, please provide:
Ship date & Delivery date
Shipping method
Pricing
Backorder information

Standard Terms and Conditions Apply. Please review our terms and conditions at the following Link: wwww.thisisthelink.com.

Purchasing Dept

 

PeopleCode:
import PT_MCF_MAIL:MCFOutboundEmail;

Local PT_MCF_MAIL:MCFOutboundEmail &objEmail = create PT_MCF_MAIL:MCFOutboundEmail();

Local string &sEmailid = "<email>";
Local string &sSubject = "";
Local string &sMessage = "";
Local number &nRet = 0;

Local string &sArg = "123456";

&sSubject = MsgGetText(<msg set>, <msg nbr>, "Message not found", &sArg);
&sMessage = MsgGetExplainText(<msg set>, <msg nbr>, "Message not found", &sArg);

&objEmail.Recipients = &sEmailid;
&objEmail.Subject = &sSubject;
&objEmail.Text = &sMessage;
&objEmail.ContentType = "text/html";

&nRet = &objEmail.Send();

/* adjustments to code may be necessary. this is just a sample */

 

Sample email that is generated:

Test Purchase Order # 123456 Please EMAIL Purchase Order confirmation before 1:00pm Eastern Time to: POs beginning 'ZZZ' or 'YYY' to somemail@email.com All other POs - to someothermail@email.com For Product Orders, please provide: Ship date & Delivery date Shipping method Pricing Backorder information Standard Terms and Conditions Apply. Please review our terms and conditions at the following Link: wwww.thisisthelink.com. Purchasing Dept

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.