最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Sending an email to multiple recipients in Alfresco - Stack Overflow

programmeradmin3浏览0评论

The Alfresco documentation talks about a paramater to_many to send an email to multiple recipients. Using this parameter from JavaScript does not work for me.

mail.parameters.to = "User 0 <[email protected]>";
mail.parameters.to_many = "User 1 <[email protected]>, User 2 <[email protected]>";

Using both to and to_many like this ignores to_many and only send to to.

Using only to_many like

mail.parameters.to_many = "User 1 <[email protected]>, User 2 <[email protected]>";

throws a NPE at

.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:557)

What is the correct way to use to_many in JavaScript to send an email to multiple recipients?

The Alfresco documentation talks about a paramater to_many to send an email to multiple recipients. Using this parameter from JavaScript does not work for me.

mail.parameters.to = "User 0 <[email protected]>";
mail.parameters.to_many = "User 1 <[email protected]>, User 2 <[email protected]>";

Using both to and to_many like this ignores to_many and only send to to.

Using only to_many like

mail.parameters.to_many = "User 1 <[email protected]>, User 2 <[email protected]>";

throws a NPE at

.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:557)

What is the correct way to use to_many in JavaScript to send an email to multiple recipients?

Share Improve this question asked Jul 4, 2014 at 14:23 user1907906user1907906
Add a ment  | 

2 Answers 2

Reset to default 6

The parameter to_many is expected to be an array of authority names.

mail.parameters.to_many = ['username1', 'GROUP_ALFRESCO_ADMINISTRATORS'];

Will send the email to the user with username1 and all members of the ALFRESCO_ADMINISTRATORS group.

Alfresco v.5.2 EA9 supports mixed array of email address, users and groups:

 mail.parameters.to_many = [
     '[email protected]',
     '"User 1" <[email protected]>', 
     'username1', 
     'GROUP_ALFRESCO_ADMINISTRATORS'];

You can use https://papercut.codeplex./ to test it, Alfresco configuration:

# smtp settings
mail.host=localhost
mail.port=25
mail.protocol=smtp
mail.smtp.auth=false
# mail.smtp.timeout=30000
# mail.smtp.debug=true
发布评论

评论列表(0)

  1. 暂无评论