Commands and functions
P.
243 of 349
Sendhtmlmail
Before the function
sendhtmlmail
can be used, the basic e-mail configuration has to be done (see
page 137).
Definition
●
Function
sendhtmlmail
(
destination, subject, message
)
Arguments
●
3 arguments of data type c1400
Effect
●
A
message
with
subject
is sent to the
destination
(character string).
●
All character strings are restricted to a maximum length of 1400 characters.
●
A line break can be achieved by using the two characters '\n' in the string,
●
Return value: 0 = e-mail successfully sent
1 = in progress
2 = error
Data type result (Return)
●
Data type u08
Example: sendhtmlmail
Every Monday at 08:00, an e-mail shall be sent to [email protected].
The subject is “EibPC“ and the message contains 2 lines “Hello World,“ (in bold) and “Here we
go!”
Implementation in the user program:
[email protected]$
subject=$EibPC$
message=$<html><head><meta name="qrichtext" content="1" /></head><body style="font-
size:11pt;font-family:Sans Serif"> <p><span style="font-weight:600">Hello World, </span></p>
<p>a message from the EibPC</p> </body></html>$
if wtime(08,00,00,MONTAG) then sendhtmlmail(email, subject, message) endif
Note:
If you don't want to send html - formatted mails, use the
sendmail
Function (page 242).
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]