Skip to main content
Kinetic Community

SMTP Email With Attachment Send

This handler builds and sends a plaintext or HTML encoded email (with an optional attachment) directly to the specified email server specified by the associated task info values.

Downloads

By downloading this file, you acknowledge that you agree to our Terms of Service

smtp_email_with_attachment_send_v2.zip

Detailed Description

This handler builds and sends a plaintext or HTML encoded email (with an optional attachment) directly to the specified email server specified by the associated task info values.
 
IMPORTANT:  To use this handler you must remove the mail.jar file from thekineticTask application.  The mail.jar file is stored in the following directory kineticTask/WEB-INF/lib.  This will require you to restart your web server as well.  This is necessary because mail.jar is an unused jar file and it creates a conflict with a library used by this handler.  This step will not be necessary
with versions of Kinetic Task 1.0.3 or later because mail.jar will no longer be distributed with the application.
 
When an HTML body is set, the handler will replace images that have a fully qualified source that is prefixed with the string 'cid:' with embedded images. This includes the image files directly into the email rather than requiring the email client to load them from the Internet.
 

This handler: SMTP Email with Attachment Send works with this handler Kinetic Request Attachment Retrieve

The use of these two Handlers in a Task tree will allow you to retrieve an Attachment submitted from a Service Item and then email that Attachment file.

The Kinetic Request Attachment Retrieve handler has two fields to populate:

Content Type 
Attachment Question Menu Label

The Content Type field is a drop down with two options:

Plain 
Base64

Select Plain if the attachment file is a simple .txt file. Select Base64 for all other file types (.xls, .pdf, .zip).
The SMTP Email with Attachment Send handler has the following field:
Attachment Encoding

The Attachment Encoding field is a drop down with two options:
Plain 
Base64

Select Plain if the attachment file is a simple .txt file. Select Base64 for all other file types (.xls, .pdf, .zip).
NOTE - This must match the value that you entered you entered into the Content Type field on the 
Kinetic Request Attachment Retrieve handler.

You would also enter the Results values (from the kinetic_request_attachment_retrieve handler) into the following fields:

Attachment File Name:
Attachment File Content:

NOTE: Image files are not yet supported. 

Parameters

Name Description
To
  A comma separated list of email address to be used as the intended recipients.
  Custom names can be used if any of the addresses are provided in the format:
  NAME <ADDRESS
CC
  A comma separated list of email address to be used as the intended CC
  recipients. Custom names can be used if any of the addresses are provided in
  the format: NAME <ADDRESS>
BCC
  A comma separated list of email address to be used as the intended BCC
  recipients. Custom names can be used if any of the addresses are provided in
  the format: NAME <ADDRESS>
Display Name (From)
  The value to be used for the Name of the sender (the email address of the
  sender can not be manually set).
Reply To
  The address of the account that email replies should be sent to.  A custom
  name can be used if the address is provided in the format: NAME <ADDRESS>
Subject The subject of the email
HTML Body
  HTML representing the body of the email (should start with '<html>' and end
  with '</html>').
Alternate Body (Text)
  A plaintext message that will be displayed if the recipient can't display
  multipart HTML emails.
Attachment File Name  The name of the file that will be attached to this email message.
Attachment File Content The content of the file that will be attached to this email message.
Attachment Encoding This parameter specifies whether the attachment content is Base64 encoded. Options: Plain,Base64. Defaults to: Plain

Sample Configuration

Parameter Example Configuration
To <%=@answer['Req Full Name']%> <<%=@answer['Req Email']%>>
CC <%=@results['Retrieve Requester Manager']['Email']%>,
BCC  
Display Name (From) <%=@template['Name']%>
Reply To
<%=@results['Retrieve Fulfiller']['Name']%> <<%=@results['Retrieve Fulfiller']['Email']%>>
Subject Your request is being processed.
HTML Body
<html>
    Your ...<br/>
    Thanks,<br/>
    <%=@results['Retrieve Fulfiller']['Name']%><br/>
  </html>
Alternate Body

Your.....

​Thanks

<%=@results['Retrieve Fulfiller']['Name']%>

Attachment File Name <%=@results['Retrieve Attachment']['Name']%>
Attachment File Content <%=@results['Retrieve Attachment']['Content']%>
Attachment Encoding Base64

Results

Name Description
Message Id The message Id of the sent email

Change Log

Version Date Description
V2   *Added Content Type to support the ability to send attachments from Questions/Answers
V1 2011-05-24 Initial Version