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.emailhostandcs.emailreturntoproperties. For SMTP servers with authentication,cs.emailaccountandcs.emailpasswordproperties 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
nullif thebodyis notnull.
body- The message body. May be
nullif thesubjectis notnull.
Returns
Returns
trueon success,falseon failure.Description
The
SendMailmethod sends an SMTP message to one or more recipients. To send mail, the Sites properties file must contain valid values for thecs.emailhostandcs.emailreturntoproperties. To receive mail, the Sites properties file must contain valid values for thecs.emailhost,cs.emailaccount, andcs.emailpasswordproperties.Error Numbers
Use
GetErrno()to view the error.Possible values of
errnoinclude:
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
bodyis not null.
body- The message body. May be null if the
subjectis 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
trueon success,falseon failure.Description
The
SendMailmethod sends an SMTP message to one or more recipients. To send mail, the Sites properties file must contain valid values for thecs.emailhostandcs.emailreturntoproperties. To receive mail, the Sites properties file must contain valid values for thecs.emailhost,cs.emailaccount, andcs.emailpasswordproperties.Error Numbers
Use
GetErrno()to view the error.Possible values of
errnoinclude:
Value Description-106 Bad parameters.-201 Can't send e-mail.
See Also
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.