Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
ICS.SendMail
Sends an SMTP e-mail message to one or more recipients.
There are two variants, whose differences are as follows:
- SendMail (Variant 1) lets you specify only
to
,subject
, andbody
.
- SendMail (Variant 2) lets you specify several additional parameters.
To send mail, the Sites properties file must contain valid values for the
cs.emailhost
andcs.emailreturnto
properties. For SMTP servers with authentication,cs.emailaccount
andcs.emailpassword
properties must also be valid.
ICS.SendMail
Sends an SMTP mail message to one or more recipients.
Syntax
public boolean SendMail(String to, String subject, String body)Parameters
to
- A valid e-mail address; for example, "
joe@oracle.com
". You can optionally specify a comma-separated list; for example:
"joe@oracle.com, jane@oracle.com"
subject
- The subject of the message. May be
null
if thebody
is notnull
.
body
- The message body. May be
null
if thesubject
is notnull
.
Returns
Returns
true
on success,false
on failure.Description
The
SendMail
method sends an SMTP message to one or more recipients. To send mail, the Sites properties file must contain valid values for thecs.emailhost
andcs.emailreturnto
properties. To receive mail, the Sites properties file must contain valid values for thecs.emailhost
,cs.emailaccount
, andcs.emailpassword
properties.Error Numbers
Use
GetErrno
()
to view the error.Possible values of
errno
include:
Value Description-106
Bad parameters.-201
Can't send e-mail.
See Also
ICS.SendMail
Sends an SMTP mail message to one or more recipients.
Syntax
public boolean SendMail(String to, String subject, String body, String replyto, String contenttype)Parameters
to
- A valid e-mail address; for example, "
joe@oracle.com
". You can optionally specify a comma-separated list; for example:
"joe@oracle.com, jane@oracle.com"
subject
- The subject of the message. May be null if the
body
is not null.
body
- The message body. May be null if the
subject
is not null.replyto
- The email address you want replies sent to. If a value is not supplied, replies will be sent to the sender's address.
contenttype
- The MIME type of the content you are sending. Default is
text/html
.
Returns
Returns
true
on success,false
on failure.Description
The
SendMail
method sends an SMTP message to one or more recipients. To send mail, the Sites properties file must contain valid values for thecs.emailhost
andcs.emailreturnto
properties. To receive mail, the Sites properties file must contain valid values for thecs.emailhost
,cs.emailaccount
, andcs.emailpassword
properties.Error Numbers
Use
GetErrno
()
to view the error.Possible values of
errno
include:
Value Description-106
Bad parameters.-201
Can't send e-mail.
See Also
Home > Contents > Index > Oracle JAVA Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.