cancel
Showing results for 
Search instead for 
Did you mean: 

how to send a email to the format - html ?

badim
Champ on-the-rise
Champ on-the-rise

alfresco 5.1

how to send a email to the format - html ?

6 REPLIES 6

openpj
Elite Collaborator
Elite Collaborator

Could you please describe exactly in detail what you want to do?

Alfresco has email templates inside the Data Dictionary space that you can change as you wish, but maybe you are talking about a different thing.

adit_patel
Confirmed Champ
Confirmed Champ

If you are looking to send html email from Alfresco Javascript below is the code

var mail = actions.create("mail");
mail.parameters.to_many =['username1', 'GROUP_ALFRESCO_ADMINISTRATORS'];
mail.parameters.from = someUserObject.properties["cm:email"];
mail.parameters.subject = "Subject Text";
mail.parameters.html = "<div>YOUR MESSAGE IN HTML</div>";
mail.execute(someDocumentObject or null);

payeq
Champ in-the-making
Champ in-the-making

Please help.

i configure outbound smtp. Test message pass. I got email from alfresco.

now i want to create a send email rules but it not working. Below is error i got from the log:

2016-10-06 16:14:56,417 ERROR [org.alfresco.util.transaction.TransactionSupportUtil] [defaultAsyncAction2] After completion (committed) TransactionalCache exception

org.alfresco.error.AlfrescoRuntimeException: 09060660 Failed to send email to:[test2, test1, testuser2]

  at org.alfresco.repo.action.executer.MailActionExecuter.sendEmail(MailActionExecuter.java:1070)

  at org.alfresco.repo.action.executer.MailActionExecuter.access$4(MailActionExecuter.java:1033)

  at org.alfresco.repo.action.executer.MailActionExecuter$2$1.execute(MailActionExecuter.java:503)

  at org.alfresco.repo.action.executer.MailActionExecuter$2$1.execute(MailActionExecuter.java:1)

  at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)

  at org.alfresco.repo.action.executer.MailActionExecuter$2.afterCommit(MailActionExecuter.java:497)

  at org.alfresco.util.transaction.TransactionSupportUtil$TransactionSynchronizationImpl.afterCompletion(TransactionSupportUtil.java:597)

  at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168)

  at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:994)

  at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:969)

  at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:800)

  at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)

  at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)

  at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:482)

  at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:479)

  at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)

  at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:432)

  at org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:119)

  at org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:88)

  at org.alfresco.repo.tenant.TenantUtil$1.doWork(TenantUtil.java:62)

  at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)

  at org.alfresco.repo.tenant.TenantUtil.runAsUserTenant(TenantUtil.java:58)

  at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:435)

  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

  at java.lang.Thread.run(Unknown Source)

douglascrp
World-Class Innovator
World-Class Innovator

Have you configured the outgoing SMTP?

Read the documentation here OutboundSMTP configuration properties | Alfresco Documentation

Once you finish the configuration, you can test it by creating a folder rule and use a send email action to send and email to you.

payeq
Champ in-the-making
Champ in-the-making

Done... configuration done... I can receive test email when I restart tomcat...

My problem now the rules not working... site invitation also not working....

I already enable site invitation mail

douglascrp
World-Class Innovator
World-Class Innovator

You have to check the logs.

If you are receiving the test email, so the system is ok.

Try to identify any email related error and post them here.