cancel
Showing results for 
Search instead for 
Did you mean: 

Use Mail Package - dynamic Conten with serveral lines

Former Member
0 Kudos

Hi;

I´m facing a scenario using a BPM.

In this a order receipt should be send to the customer via mail.

I already worked through following blogs and was able to send a mail to myself.

/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure

But there are some open issues.

1. How to send mail an serveral receiver e.g. To mike, tom etc. CC Will BCC Tom

is that possible?

2. I want to create a dynamic content with several lines.

This should be placed inline the mail body (not as attachment).

Dear "contact_person";

we received your order "ordernumber" at "date" "time"

Kind regards

XX

" " => are variables from the XI messages

How to build such a content tag of the Mail Package?

How to create a line break in the mail?.

Hope somebody could help.

Thanks in advance

Kind regards

Jochen

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

You can separate email addresses by ;

cc and bcc are not possible with mail package.

You can add \n inside the content tag to have line brakes. You can add this by the graphical mapping tool with a UDF.

Regards

Stefan

Edited by: Stefan Grube on Feb 18, 2008 6:27 PM

Former Member
0 Kudos

Hi Stefan,

thanks for your reply.

I already tried to add line breakes using "/n"

I tried to map the String "Dear madam X; /nwe received your order xxx/nKind regards" to the field content.

I expected following mail Body.

Dear madam X;

we received your order xxx

Kind regards

but the email was just the same string as in content, without any line breaktes

=> "Dear madam X; /nwe received your order xxx/nKind regards"

what´s wrong with it?

do I have to add a value to the field Content_Type?

Kind regards

Jochen

stefan_grube
Active Contributor
0 Kudos

You should not add the string "/n", but the value char 13 instead.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan;

sorry, I don´t understand your suggestion.

Can you please give an example?

just the java code.

thanks.

Kind regards

Jochen

Former Member
0 Kudos

Hi @ll;

I created a UDF for creating the mail body.

(5 input parameters, 1 output - the result string)

How can I achieve line breaks.

Could anybod publish smple code for that?

String mailMessage = "Hello sir";
mailMessage.concat("?lineBreak?");
...
return mailMessage;

Thanks for helping

Kind regards

Jochen

stefan_grube
Active Contributor
0 Kudos

mailMessage.concat("\n");

should work

Stefan

Former Member
0 Kudos

Hi Stefan;

no didn´t.

mailMessage += (char) 13;

worked.

thanks again.

Kind regards

Jochen

Former Member
0 Kudos

Hi Stefan;

sorry ...

mailMessage += "\n\n";

works as well.

I mixed up "/" and "\"

Kind regards

Jochen

Answers (0)