EmailIN input connector

EmailIN input connector
This connector retrieves input sent via email. The connector settings are described below.
Mailbox type
The type of mailbox on the mail server.
Port
The port the StreamServer will use to communicate with the mail server.
Mail folder
The mail folder to scan for input. Leave this empty if you want to select the Inbox.
Mail server
The mail server IP address or host name.
User name
A user name for accessing the mailbox. If several StreamServer instances retrieve input from the same mail server, each instance must use a unique user name.
Password
A password for accessing the mailbox.
Read email body text
Select to enable processing of the email body. You can disable this option if you only want to process email attachments.
Retrieve email
Retrieve all – Retrieve all emails in the mailbox.
Advanced – Use the filter parameters below to specify which emails to retrieve. You can use wildcards.
From – Retrieve emails with specific From addresses.
To – Retrieve emails with specific To addresses.
Cc – Retrieve emails with specific Cc addresses.
Date – Use a timeframe to specify which emails to retrieve. The timeframe corresponds to the date and time the email was received. Use YYYY-MM-DD as format.
Subject – Retrieve emails with specific subjects.
Reply to – Retrieve emails with specific Reply to addresses.
Request encryption – Select to reject un-encrypted emails.
Request signature – Select to reject unsigned emails.
Example 5
Date: 2002-01-**
Emails dated January 2002 will be retrieved.
 
Read attachment
Specifies which attachments to process.
Example 6
An email contains the attachments INVOICE_101.xml, INVOICE_101.txt and COPY_101.xml.
If Read attachment file is *.xml, the attachments INVOICE_101.xml and COPY_101.xml will be processed.
If Read attachment file is INVOICE*.xml, only INVOICE_101.xml will be processed.
 
Delete mail
No – Do not delete emails.
Delete Processed – Delete all retrieved and processed emails.
Delete all – Delete all retrieved emails.
Advanced – Use the filter parameters below to specify which retrieved emails to delete.
Delete From – Delete emails with specific From addresses.
Delete To – Delete emails with specific To addresses.
Delete Cc – Delete emails with specific Cc addresses.
Delete Date – Use a timeframe to specify which emails to delete. The timeframe corresponds to the date and time the email was received. Use YYYY-MM-DD as format.
Delete Subject – Delete emails with specific subjects.
Delete Reply to – Delete emails with specific Reply to addresses
Example 7
Delete Date: 2002-01-**
Emails dated January 2002 will be deleted.
 
Save attachment
Select to save attachments to disk. The attachment files saved to disk will be given new unique names. The reason for this is to prevent files from being overwritten. You must use the following scripting functions where you map the original file names to the corresponding names of the files saved to disk:
Example 8
$i=1;
$count = GetAttachmentCount();
while(num($i)<=num($count))
{
  $original = GetAttachmentOriginalFile(num($i));
  if($original = "streamserve.gif")
  {
    $file = GetAttachmentFile(num($i));
  }
  $i++;
}
 
Attachments saved to disk are not removed automatically. One way to delete the attachments is to call an After Event script using the FileDelete scripting function.
Example 9
$i=1;
$count = GetAttachmentCount();
while(num($i)<=num($count))
{
  $delete = GetAttachmentFile(num($i));
  FileDelete($delete);
  $i++;
}
 
Attachment directory
The directory where to save the attachments.
Schedule
Opens the Scheduler Configuration dialog where you specify when and how often to try to retrieve emails. See Scheduling actions in the Design Center documentation for more information about scheduling.
Ignore email content
Select to ignore the email body and attachments. You can use this option to trigger an Event when an email is received, but not process any information in the email. In this case, you must use an all matching pattern in the Event (e.g. “?”).
For example, use this option in “auto reply Projects”, and use the GetConnectorValue script function to retrieve the appropriate email attributes (From, Reply To, etc.).
Additional scripting functions for attachment handling
Current attachment
You can use the CurrInFileName scripting function to fetch the file name of the current attachment sent through the StreamServer.
Content type and encoding of attachments
To retrieve content type and encoding of attachments you can use the following scripting functions.
EmailIN attributes
You can use the scripting function GetConnectorValue to fetch EmailIN attributes.
GetConnectorValue("<attribute>")
GetConnectorValue("From")
GetConnectorValue("To")
GetConnectorValue("Cc")
GetConnectorValue("Reply To")
GetConnectorValue("Subject")
GetConnectorValue("Date")
GetConnectorValue("Encoding")
GetConnectorValue("Type")
GetConnectorValue("AttEncoding<n>")
where <n> is the attachment number.
GetConnectorValue("AttType<n>")
where <n> is the attachment number.
GetConnectorValue("AttCount")
 
OpenText StreamServe 5.6 Updated: 2013-03-01