It's all about the answers!

Ask a question

sending email notifications with file attachments in IBM CLM


Sajjad Ali Khan (31548) | asked Jul 09 '15, 8:56 a.m.
 Dear All,

I'm using CLM 5.0.2 and i want to generate email notifications along with file attachments e.g. email notification for "Person A" with the attachment of daily report file.

I hope there must be a solution for this issue.

Waiting for the solution.

Regards,
Sajjad.

3 answers



permanent link
Kevin Ramer (4.3k6156174) | answered Jul 09 '15, 9:43 a.m.
I doubt this is possible.  There are Email templates, but they do not allow attachments.  RRDI (If available) can be used to run reports on a schedule and can send them out via e-mail.

Comments
Sajjad Ali Khan commented Jul 10 '15, 9:48 a.m.

 Thanks for replying me.


I think there must be some any technique through which i can attach file or the link of file or work item while sending email notification.
Please help me as i really need to either attach a file or attach the link of file when i send an email from the comments e.g. @UserID link of file/report/workitem which second user can view.


Sajjad Ali Khan commented Aug 11 '15, 4:24 a.m. | edited Aug 14 '15, 7:34 p.m.

  Kevin Ramer


Thanks for replying me.

I think there must be some any technique through which i can attach file or the link of file or work item while sending email notification.
Please help me as i really need to either attach a file or attach the link of file when i send an email from the comments e.g. @UserID link of file/report/workitem which second user can view.


Kevin Ramer commented Aug 11 '15, 1:16 p.m. | edited Aug 14 '15, 7:35 p.m.

This is my opinion   RTC is not a notification/email system, so it should not be expected to behave like one.


permanent link
Geoffrey Clemm (29.2k23035) | answered Aug 14 '15, 7:45 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In your question, it sounds like you want to automatically generate an email notification to a specific person, when you attach a file to a work item, and you want that email to contain that file attachment.  Is that correct?  In your comment above, you indicate that a link to that file would be sufficient (i.e. that it is OK for the email to contain a URL link to the attached file, rather than actually contain the file).   Is that correct?
If so:
- Add that specific person as a subscriber to the work item
- Have that person indicate in their RTC profile that they want to receive email notifications
- Every time you add an attachment to that work item, also add a comment containing the URL of the new attachment.
- That person will automatically get email with a link to the attachment.

permanent link
Hemant Kumar (11) | answered Feb 20 '16, 3:05 p.m.
RTC provides below API in IMailerService to send mulitpart email messages -
public void sendMultipartMail(MailSender sender, String toAddress, String subject, Multipart msg, String cc) throws MessagingException;
I have used the same API to attach a file into email. Below is the sample code for same -

            // Create a multipart message
            Multipart multipart = new MimeMultipart();

            // Part1 is plain text. Create the plain text message and add into multipart
            BodyPart messageBodyPart = new MimeBodyPart();
            messageBodyPart.setText("Mail text Content");
            multipart.addBodyPart(messageBodyPart);

            // Part two is attachment, add that too into multipart
            messageBodyPart = new MimeBodyPart();
            DataSource source = new FileDataSource("/tmp/my_attachment");
            messageBodyPart.setDataHandler(new DataHandler(source));
            messageBodyPart.setFileName("AttachmentName");
            multipart.addBodyPart(messageBodyPart);

            mailerService.sendMultipartMail(mailerService.getDefaultSender(), "test@gmail.com",
                    "subject", multipart, null);

I suppose this would serve the purpose.

Your answer


Register or to post your answer.