在Hybris中发送电子邮件时如何设置TO ADDRESS? [英] How to set TO ADDRESS while sending an email in Hybris?
问题描述
当用户回复他收到的邮件时,应转到特定的电子邮件ID.我尝试给出DefaultEmailGenerationService.java
,但没有反映出来.
When user replies on a mail that he has received that should go to particular email id. I tried to give in DefaultEmailGenerationService.java
but it didn't reflect.
有人可以建议如何实现它吗?
Could any one suggest how it can be achieved?
推荐答案
场景1:
如何从Hybris中更改电子邮件的电子邮件地址?
How to change fromEmail Address of an email in Hybris?
正如我在评论中提到的,如果要设置from emailAddress
,则可以使用Impex进行设置.只需找出您的emailPage并设置fromEmail
和fromName
.
As I mentioned in the comment if you want to set from emailAddress
you can do that using Impex. Just find out what is your emailPage and set fromEmail
and fromName
.
如何为所有电子邮件在Hybris中设置对地址的修正?
How to set fix toAdress in Hybris for all email?
在这种情况下,如果要将所有电子邮件发送到某个修订版toAddress
,则需要覆盖renderer template
的各个*EmailContext
中的email
和displayName
.
If you want to send all emails to some fix toAddress
, in that case, you need to override email
and displayName
in respective *EmailContext
of renderer template
.
让我们假设您要覆盖客户注册流程中的toAddress
.因此,在这里您需要找到上下文类名形式的impex.以下是客户注册主题&的渲染器模板. body和CustomerEmailContext
是将所有数据馈送到此渲染器的类名.现在,您只需在CustomerEmailContext.java
Let's just assume you want to override toAddress
in customer registration flow. So here you need to find context class name form impex. Below are the renderer template for customer registration subject & body and CustomerEmailContext
is the class name which will feed all data to this renderer.Now you just need to populate those data in init
method of CustomerEmailContext.java
如何在Hybris中支持多个toAddress和附件?
How to support multiple toAddress and attachments in Hybris?
要支持多个toAddress& fromAddress,ccAddresses,bccAddress和附件.
To support multiple toAddress & fromAddress, ccAddresses, bccAddresses and attachments.
- 您需要在以下位置创建自定义字段(toAddressList,ccAddresses等)
您的
*EmailContext
并填充值. - 覆盖
DefaultEmailGenerationService
类的generate
方法. - 像
emailContext.get("yourcustomFiled")
一样从 - 以这种方式修改
createEmailMessage
方法,以便您可以将所有自定义字段(toAddressList,ccAddresses等)传递给最终的DefaultEmailService
emailContext
获取您的价值
- You need to create custom fields(toAddressList, ccAddresses etc) in
your
*EmailContext
and populate the value. - Override
generate
method ofDefaultEmailGenerationService
class. - Fetch your value from
emailContext
likeemailContext.get("yourcustomFiled")
- Modify
createEmailMessage
method in such way so you can pass all your custom fields(toAddressList, ccAddresses etc) to finalDefaultEmailService
这篇关于在Hybris中发送电子邮件时如何设置TO ADDRESS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!