在Hybris中发送电子邮件时如何设置TO ADDRESS? [英] How to set TO ADDRESS while sending an email in Hybris?

查看:284
本文介绍了在Hybris中发送电子邮件时如何设置TO ADDRESS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户回复他收到的邮件时,应转到特定的电子邮件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并设置fromEmailfromName.

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中的emaildisplayName.

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")
  • 一样从emailContext获取您的价值
  • 以这种方式修改createEmailMessage方法,以便您可以将所有自定义字段(toAddressList,ccAddresses等)传递给最终的DefaultEmailService
  • You need to create custom fields(toAddressList, ccAddresses etc) in your *EmailContext and populate the value.
  • Override generate method of DefaultEmailGenerationService class.
  • Fetch your value from emailContext like emailContext.get("yourcustomFiled")
  • Modify createEmailMessage method in such way so you can pass all your custom fields(toAddressList, ccAddresses etc) to final DefaultEmailService

这篇关于在Hybris中发送电子邮件时如何设置TO ADDRESS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆