E-Mail sender

E-Mail sender

E-Mail sender

This sender you can use to send the content of your ConnectMessage to one or more e-mail adresses. Depending on the configured MessagePart the content consists of simple text or multipart with attachments.

Email addresses should be formatted in the following manner:

  • Adresses are separated by semi-colons.
  • You can put a personal name after the email address separated by a space.
  • Everything after the first space will be regarded as a personal name until the next semi-colon. For example: 'john.doe@test.com John Doe;jane.doe@test.com Jane Doe'. This is true for the fields: To, CC, BCC, From and Reply To, as well as the headers mail.to, mail.cc, mail.bcc, mail.from and mail.replyto.

In case a specific MessagePart is mentioned and this MessagePart is a String or Document, a text e-mail is sent.

In case MessagePart is a BYTE[] or MessagePart is configured as ‘ALL’ , a Multipart Mime Message is sent.

The name of the attachtment will be read from the “content-name” property of the MessagePart in question. When a Multipart Mime Message is sent, the String or Document content of msgprt0 is used as bodypart of the Message.

In case a MessagePart has type OBJECT, the object will be serialized and added as attachment.

 In the table below, you will find an explanation about these properties. All attributes with a ‘*’ are mandatory.

Attribute

Description

Name*

By default, we fill this out with the technical ‘tag’, followed by a serial number. Changing the name is optional.

Enabled

Set this value to true, if you want this producer to be enabled.

MessagePart

Name of the MessagePart in a ConnectMessage where the content of the file is being stored.

Subject

Subject of the e-mail. This option can be overwritten by setting the mail.subject property of the ConnectMessage.

To*

E-mail recipient's address. This option can be overwritten by setting the mail.to property of the ConnectMessage.

CC

E-mail address to send the CC (Carbon Copy) to. This option can be overwritten by setting the mail.cc property of the ConnectMessage.

BCC

E-mail address to send the BCC (Blind Carbon Copy) to. This option can be overwritten by setting the mail.bcc property of the ConnectMessage.

From*

E-mail address of the sender. This option can be overwritten by setting the mail.from property of the ConnectMessage.

Reply To

Reply To e-mail address. This option can be overwritten by setting the mail.replyto property of the ConnectMessage.

Host*

Hostname or IP-address of the mail server.

Port

Mail server's port number. The default is 25.

User-Name

Username for the mail server.

Password

Password of the mail server.

STARTTLS

Set the connection security to STARTTLS. The default is false (Off).

Mail Debug

Turn the JavaMail API debug-logging in the log file of ConnectAgent on or off. The default setting is false, turned off.

MessagePart As Attachment

 

If you set this value to true, the message part wille be send as an attachement instead as body text.

Description Description of the specific producer. This is for documentation purposes.

 

 

HTML Mailing

When you want to send an HTML formatted email you can use the following headers:

  • content-type: specifies the content type of the MessagePart. By default this is set to 'text/plain'. You can use this header to set the content type of your Message Part to for instance 'text/html' or 'image/*'.
  • content-name: specifies the name used when the MessagePart is defined as an attachtment or used inline. If this is not set the MessagePart name is used.
  • mimepart-type: defines if a MessagePart should be added to the email as a BODY, ATTACHMENT or INLINE. If no mimepart-type is defined the following table shows the default based on the type of content in the MessagePart:
    MessagePart Type Default mimepart-type
    TEXT BODY
    DOCUMENT BODY
    BYTE_ARRAY ATTACHMENT
    OBJECT ATTACHMENT
    FILE ATTACHMENT
  • If more than one MessagePart is defined as BODY, only the last of these MessageParts will actually be used as the body for the email.
  • A DOCUMENT part will be converted to an xml string and then added. The content-name will always end with .xml
  • An OBJECT will be added by serializing the Object, unless the Object is a MesagingException. In that case the StackTrace will be added as ATTACHMENT or as BODY if mimepart-type = BODY
  • A FILE wil be read and added as ATTACHMENT or as BODY if mimepart-type = BODY
  • You can send emails with INLINE parts. INLINE parts can be used in text/html message to have a reference to another mimepart which holds of instance picture data, for example: 
<img src="cid:test.jpg" alt="Smiley face" height="480" width="640"/>

The cid:test.jpg here is a reference to an INLINE mimepart with name test.jpg, which is set in the ConnectMessagePart with mimepart-type=INLINE, content-type = image/* and content-name = test.jpg

Email to Exchange365 or Office365

.If you want to email to an office365 E-Mail account you can do this using the following settings in your EMAIL sender:

You also need the certificate from smtp.office365.com in you trustStore. To get this certificate you can use openSSL to get this certificate.

Use the next command to get the information for the certificate:

openssl s_client -showcerts -connect smtp.office365.com:587 -starttls smtp 

You will get the information in the following format:

CONNECTED(00000003)
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, CN = DigiCert Cloud Services CA-1
verify return:1
depth=0 C = US, ST = WASHINGTON, L = Redmond, O = Microsoft Corporation, CN = outlook.com
verify return:1
---
Certificate chain
 0 s:/C=US/ST=WASHINGTON/L=Redmond/O=Microsoft Corporation/CN=outlook.com
   i:/C=US/O=DigiCert Inc/CN=DigiCert Cloud Services CA-1
-----BEGIN CERTIFICATE-----
MIIGKDCCBRCgAwIBAgIQDzMzs7xGVulbI0qZMRNoezANBgkqhkiG9w0BAQsFADBL
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSUwIwYDVQQDExxE
aWdpQ2VydCBDbG91ZCBTZXJ2aWNlcyBDQS0xMB4XDTE2MTExNzAwMDAwMFoXDTE3
MTExNzEyMDAwMFowajELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldBU0hJTkdUT04x
EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv
bjEUMBIGA1UEAxMLb3V0bG9vay5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQCqIm5jtfxTLIQuJcxlTTUqJLar2qlYWXlmJyJFmErwtFyWgDgkpWqK
C4Hnk9bpoLdYvwQ7typORxXd2r8X6eDx8yoevxaWfo6NF9njWerNonCihVy87w8u
WoN3/BGZCJMp/0QuFyVe1MJuOj3R3quyozLvDwtJD92gUs5HJtngMkwJ2pxIkqbT
sSMBbcEKczHY5FRejLEnYqKx4u65GE3zwUUffyuwL7bShOPCfARp57Mjvr07Bmng
wLiYdKs74j/XBcwe30WxaSs4dUVhaG9LfTuqW/vOJXjZPW/n0axuRvA8nMr/5rKt
awWIdQ9/7K9Fwa+Urq6L/I2xMachB32fAgMBAAGjggLnMIIC4zAfBgNVHSMEGDAW
gBTdUdCiMXOpc66PtAF+XYxXy5/w9zAdBgNVHQ4EFgQUJsShNYS5psfb493ebQTy
BMZV25YwggEGBgNVHREEgf4wgfuCHWNjcy5sb2dpbi5taWNyb3NvZnRvbmxpbmUu
Y29tggtvdXRsb29rLmNvbYINKi5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A
MA4GA1UdDwEB/wQEAwIBhjA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGGGGh0
dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTB7BgNVHR8EdDByMDegNaAzhjFodHRwOi8v
Y3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDegNaAz
hjFodHRwOi8vY3JsMy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290Q0Eu
Y3JsMD0GA1UdIAQ2MDQwMgYEVR0gADAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3
dy5kaWdpY2VydC5jb20vQ1BTMB0GA1UdDgQWBBTdUdCiMXOpc66PtAF+XYxXy5/w
9zAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTANBgkqhkiG9w0BAQsF
AAOCAQEACCnEyKb+tDgo96MZZ4zqBTsOS0BiYh48FMYF3DanTzJxRgVegB1ca/Bt
bdkhdgu9RsS5ZpdN/4AUeodphLLW/8kWcL6jzIshre5cjSStwo+Z4MyeigkDuA+a
tVuQKyr316UvSmWoxOTFx3GplkZPq21LKhbL8ak79h8hObTrrWAEgpsSv96r0kYd
DA07dgL5C9XOU4VCeylNRtGLzWTsIRZPLwFDWNFl7Vyl+0Sg0lDo3mbEtjGehzMD
sMnGSxLnWzWU2UbOMeu/uPaeC4SFgiJWxCOEVOdSMwwlyxrsRFUPY5Zys80ZXn4O
J4XVpOqw4qXcBiklkOjOLOnp0Hzvzg==
-----END CERTIFICATE-----
---
Server certificate
subject=/C=US/ST=WASHINGTON/L=Redmond/O=Microsoft Corporation/CN=outlook.com
issuer=/C=US/O=DigiCert Inc/CN=DigiCert Cloud Services CA-1
---
No client certificate CA names sent
Server Temp Key: ECDH, secp384r1, 384 bits
---
SSL handshake has read 3707 bytes and written 508 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES256-SHA384
    Session-ID: 7F470000D3534A2E962B384C7F497D424F81E1069463E819B4443E9761B885A9
    Session-ID-ctx:
    Master-Key: 9CB8E3F19056A56AE06101EF524B62A708503514B5288E81BA7291BD2361AF36F49872713A52882B76923BE9C497CA40
    Key-Arg   : None
    Krb5 Principal: None
    PSK identity: None
    PSK identity hint: None
    Start Time: 1484315105
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---
250 SMTPUTF8
DONE

Select the certificate, which is the section between ------BEGIN CERTIFICATE-----  and -----END CERTIFICATE-----

Copy the selection to a file named www.digicert.com.crt. It will look like this:

-----BEGIN CERTIFICATE-----
MIIEkjCCA3qgAwIBAgIQAZ7Bxr0/WXuyDDM45VHYdzANBgkqhkiG9w0BAQsFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
QTAeFw0xNTA4MDQxMjAwMDBaFw0zMDA4MDQxMjAwMDBaMEsxCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJTAjBgNVBAMTHERpZ2lDZXJ0IENsb3Vk
IFNlcnZpY2VzIENBLTEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDR
rfaHFHlUJ1fHLwVoPJs8zWfsRRAshPKkR8TZU0JFCbvk/jPB17xGL9GL5re1Z3h8
anC+/bjltlTPTF6suCJ0c1UpCHPIZPfQlQkOeYNQv1/11MybQmGOgAS5QarOThKZ
m6zWxb5bAnO1FqSrcWLUmOpAOYWm9rsv6OeHwov2nDLN7Pg+v4nndCOCS9rqv3Om
JTz9v6nlaP/4MKJgxzsuo/PFfzs7/Q8xoXx0D9C/FMS9aPGl52un35sAfkYlTubo
E/P2BsfUbwsnIEJdYbw/YNJ8lnLJfLCL//lIBVME+iKvt81RXW3dkHQD8DNP9MfA
PlZGR69zIIvcej6j8l3/AgMBAAGjggFaMIIBVjASBgNVHRMBAf8ECDAGAQH/AgEA
MA4GA1UdDwEB/wQEAwIBhjA0BggrBgEFBQcBAQQoMCYwJAYIKwYBBQUHMAGGGGh0
dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTB7BgNVHR8EdDByMDegNaAzhjFodHRwOi8v
Y3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290Q0EuY3JsMDegNaAz
hjFodHRwOi8vY3JsMy5kaWdpY2VydC5jb20vRGlnaUNlcnRHbG9iYWxSb290Q0Eu
Y3JsMD0GA1UdIAQ2MDQwMgYEVR0gADAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3
dy5kaWdpY2VydC5jb20vQ1BTMB0GA1UdDgQWBBTdUdCiMXOpc66PtAF+XYxXy5/w
9zAfBgNVHSMEGDAWgBQD3lA1VtFMu2bwo+IbG8OXsj3RVTANBgkqhkiG9w0BAQsF
AAOCAQEACCnEyKb+tDgo96MZZ4zqBTsOS0BiYh48FMYF3DanTzJxRgVegB1ca/Bt
bdkhdgu9RsS5ZpdN/4AUeodphLLW/8kWcL6jzIshre5cjSStwo+Z4MyeigkDuA+a
tVuQKyr316UvSmWoxOTFx3GplkZPq21LKhbL8ak79h8hObTrrWAEgpsSv96r0kYd
DA07dgL5C9XOU4VCeylNRtGLzWTsIRZPLwFDWNFl7Vyl+0Sg0lDo3mbEtjGehzMD
sMnGSxLnWzWU2UbOMeu/uPaeC4SFgiJWxCOEVOdSMwwlyxrsRFUPY5Zys80ZXn4O
J4XVpOqw4qXcBiklkOjOLOnp0Hzvzg==
-----END CERTIFICATE-----

Add this via deploy to your trust store and you should be able to email with Office365