|
Syntax:
|
SEND_MAIL(<Subject>, <Text>,
<Receiver>, <Files> [,<Send
Immediately> [,<Sender>,
<Mailserver>, <Header>, <Username>, <Password>]])
|
<Subject>
|
= <STRING-EXPRESSION>
|
|
<Text>
|
= <STRING-EXPRESSION>
|
|
<Receiver>
|
= <STRING-EXPRESSION>
|
|
<Files>
|
= <STRING-EXPRESSION>
|
|
<Send Immediately>
|
= <NUM-EXPRESSION>
|
|
<Sender>
|
= <STRING-EXPRESSION>
|
|
<Mailserver>
|
= <STRING-EXPRESSION>
|
|
<Header>
|
= <STRING-EXPRESSION>
|
|
<Username>
|
= <STRING-EXPRESSION>
|
|
<Password>
|
= <STRING-EXPRESSION>
|
|
|
|
|
|
Meaning:
|
Sends an email.
SEND_MAIL returns the following values:
|
0
|
No error
|
|
1080
|
ERRORTEXT$ contains
the error message
|
|
-1
|
Runtime error
|
|
-5
|
Sender is missing
|
|
-6
|
The mail dialog has been cancelled
|
Attention: The libraries mail.jar and
mailapi.jar must be available and the environment variable CLASSPATH must
contain the path to that libraries. e.g. SET CLASSPATH=./mail.jar;./mailapi.jar
|
|
Parameter:
|
Subject
|
Subject text
|
Text
|
Message
text
|
Receiver
|
Email address of the receiver
|
Files
|
Contains separated by semi-colons the files
to be attached. For each file the complete path with drive letter must be
specified. Furthermore, a second name can be specified (separated by a
comma) behind every file name, which is displayed in the message.
|
Send Immediately
|
0: A dialog window is opened, in which the data
can be entered. <Header> specifies the title of the dialog window.
Attention: With Java-2T-Programs the client computer will send the email.
With Html-2T-Programs always that computer will send the email on which the
Ebus-2T-Server is running.
<> 0: The email is sent immediately
Attention: With 2T-Programs the computer on which the Ebus-2T-Server is
running will send the email.
|
Sender
|
Email address of the sender
|
Mailserver
|
Specifies the name of the mail server. If
<Mailserver> = "", the standard mail server
"post.webmailer.de" is used.
|
Header
|
Specifies the title in the dialog window
with <Send Immediately> = 0.
|
Username
|
Username of Mailserver
|
Password
|
Password of Mailserver
|
|
|
Sample:
|
H% = SEND_MAIL("Our
meeting",
"Sorry, I
have to cancel the meeting." + EBUS_LINEFEED$
+
"I’ll call
you up next week.",
"support@ebusoft.de",
"C:\tmp\test.dat,Testfile",
0,
"",
"",
"Send email"
"Smith"
"Password-3")
IF H% <> 0
THEN ... Error ...
ENDIF
|
|
See also:
|
SEND_MAIL_CLIENT
|