01-10-2008 02:21 AM
01-14-2008 09:14 AM
01-14-2008 02:09 PM
var mail = actions.create('mail');
mail.parameters.to = 'a@b.com'; // or maybe person.properties["cm:email"];
mail.parameters.from = 'alfresco@system.com';
mail.parameters.subject = 'Please Review this Document';
mail.parameters.text = 'Blah blah blah\n\n';
mail.parameters.text += 'Doc: http://www.srv.com/alfresco/d/a/workspace/SpacesStore/a9...fd/doc.pdf';
mail.execute(document);
12-02-2008 07:42 AM
12-02-2008 08:35 AM
for (final NodeRef attachmentNodeRef : attachments) {
final MimeBodyPart attachment = new MimeBodyPart();
attachment.setDataHandler(new DataHandler(new DataSource() {
public InputStream getInputStream() throws IOException {
ContentReader reader = contentService.getReader(attachmentNodeRef, ContentModel.PROP_CONTENT);
return reader.getContentInputStream();
}
public OutputStream getOutputStream() throws IOException {
throw new IOException("Read-only data");
}
public String getContentType() {
return contentService.getReader(attachmentNodeRef, ContentModel.PROP_CONTENT).getMimetype();
}
public String getName() {
return nodeService.getProperty(attachmentNodeRef, ContentModel.PROP_NAME).toString();
}
}));
attachment.setFileName(nodeService.getProperty(attachmentNodeRef, ContentModel.PROP_NAME).toString());
content.addBodyPart(attachment);
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.