Package: mail

Installation

Install the bundle

In the karaf console type the folowing command:

bundle:install mvn:one.erp/one.erp.workflow.ext/1.4

Configure the bundle

In the karaf console type the folowing commands:

config:edit one.erp.workflow.ext.mail
config:property-set from no-reply@onesoftware.ro
config:property-set host smtp.gmail.com
config:property-set port 465
config:property-set secure true
config:property-set startTLS true
config:property-set auth true
config:property-set user vlad@onesoftware.ro
config:property-set password pass
config:property-set overrideSystemProperties true
config:update

Configuration

PID: one.erp.workflow.ext.mail

PropertyDefault valueDescription
fromno-reply@onesoftware.roThe from field for all the send emails
hostsmtp.gmail.comThe host
port465The port
securetruetrue is the connection is secure, false otherwise
startTLStruetrue if STARTTLS command should be used, false otherwise
authtruetrue if the mail server requires authentication, false otherwise
user
the user name for authentication
password
the password for authentication
overrideSystemPropertiestruetrue if the system properties (java) should be overridden

API

send

function send(to as string, subject as string, body as string) as bool

Sends an email.

sendFile

function sendFile(to as string, subject as string, body as string, idStorageFile as int) as bool

Send an email with a file as an attachment.

isValidAddress

function isValidAddress(address as string) as bool

Returns true if the specified email address is valid.