Products Downloads


French version


 

 

The VaToolBxJavaSendMail lets you send a mail. The features of this function are those usually offered by any email tool (send to one or more recipients, in CC or BCC modes, inclusion of one or more attachments).

 

Prerequisites: the following files must be present in the execution context:

    • activation.jar
    • mail.jar

These files are included in some versions of Tomcat 4.1 and in WebSphere 5.

 

Context

  • Java client,

  • Java server,

  • Adelia Web client,

  • Adelia Cloud client,

  • Event Adelia client.

 

Parameters

ALPHA(n)

Protocol

Protocol (e.g. "smtp", "pop3", "imap", "nntp", "mmbox", "p7")

ALPHA(n)

Host

Host name

NUM_BIN_2

Port

Port number

ALPHA(n)

User

User name

ALPHA(n)

Password

User's password

ALPHA(n)

Subject

Subject of email

ALPHA(n)

Body

Email text body

ALPHA(n)

From

Sender's name

ALPHA(n)

To

Main recipient (To)

ALPHA(n)

Copy(m)

Array containing the recipients of a carbon copy (Cc) of the message. Each entry in the array corresponds to a Cc recipient. Stops when the first blank entry is reached.

ALPHA(n)

Bcopy(m)

Array of recipients of a blind carbon copy (Bcc) of the message. Each entry in the array corresponds to a Bcc recipient. Stops when the first blank entry is reached.

ALPHA(n)

Attach(m)

Array containing the file names of the attachments to the email. Each entry corresponds to the full name of an attached document. Stops when the first blank entry is reached.

BOOL

ReturnCode

Return code for the operation:

*TRUE   if the operation was successful.

*FALSE  if the operation failed.

 

Note: The only output parameter is the return code (13th and final parameter).

 

Example

ALPHA(50)

Protocol

ALPHA(50)

Host

NUM_BIN_2

Port

ALPHA(50)

User

ALPHA(50)

Password

ALPHA(50)

Subject

ALPHA(500)

Body

ALPHA(50)

From

ALPHA(50)

To

ALPHA(50)

CC(10)

ALPHA(50)

BCC(4)

ALPHA(246)

Attach(3)

BOOL

ReturnCode

 

 

Protocol

= 'smtp'

Host

= 'mailhost.hardis.com'

Port

= 25

User

= 'JSmith'

Password

= 'pwdsmith'

From

= 'john.smith@hardis.com'

Subject

= 'This is an example'

Corps

= 'This is the body of my example message'

To

= 'katy.clifford@hardis.com'

CC(1)

= 'david.jenkins@hardis.com'

CC(2)

= 'john.moore@hardis.com'

BCC(1)

= 'helen.parker@hardis.com'

Attach(1)

= 'd:\mypicture.jpg'

 

 

CALL_DLL 'VaToolBx' 'VaToolBxJavaSendMail' Protocol Host Port User Password Subject Body From To Cc Bcc Attach ReturnCode

 

List of the VaToolBx functions by topic

 

↑ Top of page

  • Aucune étiquette