rrusev
rrusev

Reputation: 103

How to send multiple confirmation emails after order-process in HYBRIS?

How can I send multiple emails after order-process? In my way when I add products to cart and go to cart , I have option to choose some emails. For example before place order I want to send emails and to [email protected], [email protected] and [email protected] confirmation emails. Hybris OOTB has a process for sending email to customer which you are login in storefront. ( For example [email protected] ) . So I'm with Lucas in storefront and now when I place order only [email protected] recived an email from [email protected]. I saw in GenerateEmailAction.java this piece of code

final List<EmailMessageModel> emails = new ArrayList<>();
emails.addAll(businessProcessModel.getEmails());
emails.add(emailMessageModel);
businessProcessModel.setEmails(emails);
getModelService().save(businessProcessModel);

so probably somehow can set multiple emails. One note, when I place order , I already have in orderProcessModel selected emails.

orderProcessModel.getOrder().getEmails() 

which is Collection< String>

Upvotes: 0

Views: 1334

Answers (1)

HybrisHelp
HybrisHelp

Reputation: 5810

In OOTB Hybris email functionality does not support attachment, CC, BCC, multiple toAddress, etc. It should be OOTB, I hope it may come in the latest version.

To solve this, you have to define those custom attributes in BusinessProcessModel to stores the values and access them later in DefaultEmailGenerationService service. Also, you have to override the DefaultEmailGenerationService to support multiple toAddress.

For more details, follow hybris-support-multiple-toaddress.

Upvotes: 1

Related Questions