This item was originally published in May, 2002.
NOTE: This hook is presented only as an example of how to customize your use of IBM® Rational® ClearQuest®. It has not been formally tested, and is not supported by IBM.
The built-in ClearQuest OLEMailMsg object (aka "PAINET.MAILMSG") does not support attachments. If you need to include an attachment in an e-mail message, consider creating an e-mail object from MS Outlook instead. The following code fragment demonstrates how to create such an object, initialize and send it. If you need to attach a ClearQuest attachment to this e-mail, you must first save the ClearQuest attachment to the filesystem (using the Attachment.Load method), and specify its path name in place of "attachment path" below. An example of using the Attachment object can also be found in HOOKS00000419.
VB Script
set out=WScript.CreateObject("Outlook.Application")
set mapi=out.GetNameSpace("MAPI")
set mail=out.CreateItem(0)
mail.Recipients.Add(cqrecipient)
mail.Subject = "cq bug..."
mail.Body = "bug description..."
mail.Attachments.Add ("attachment path")
mail.Send |
Hook Submitter:
Jamie Echlin
jechlin@nettaxi.com
Comments (Undergoing maintenance)





