Custom JSP tag. Body tag Sendmail lets you send mail through smtp host. Parameters are:
1) host describes SMTP host
2) port describes SMTP port. Default value is 25
3) domain describes your domain
4) subject subject for your letter
5) to describes destination address. You may
use a comma separated list here.
6) cc Optional parameter. Describes Cc address. You may
use a comma separated list here.
7) bcc Optional parameter. Describes Bcc address. You may
use a comma separated list here.
8) from describes source address
9) user Optional parameter. Describes user name (if authentication is required)
10) password Optional parameter. Describes password (if authentication is required)
11) content describes mail body. You may
use the body of this tag also.
12) attachment Optional parameter. You may describe comma separated
list of files here.
13) html Optional parameter. Possible values are
true or false. Set this value to true if you need to send mail in html
format. Default value is false.
14) charset Optional parameter. Describes a charset for your letter.
15) encoding Optional parameter. Describes a Content-Transfer-Encoding header.
16) debug Optional parameter. Possible values are
true or false. Set this value to true if you need to trace the output from your
mailserver on the system console. Default value is false.
17) id Optional parameter. Describes a name for your page scope variable
(type is java.lang.Boolean) that will keep a status (result) of sending.
For example:
<%@ taglib uri="taglib.tld" prefix="send" %>
<send:Sendmail
host="relay.company.com"
domain="company.com"
port="25"
from="admin@company.com"
to="customer@acme_company.com"
subject="Order confirmation">
Thank you for using our shop.
Your order Id is 123456789
</send:Sendmail>
Tag supports attachments and mail server authentication also:
<%@ taglib uri="taglib.tld" prefix="send" %>
<send:Sendmail
host="relay.company.com"
domain="company.com"
port="25"
user="guest"
password="12345"
from="admin@company.com"
to="customer@acme_company.com"
subject="See attachment"
content="Please, see attachment:"
attachment="c:\\command.com" />
for downloading:
Library: sendmail.jar Description: taglib.tld
You can buy this component here
© Coldbeans
Comments?
See also Coldtags suite - the largest collection of custom JSP tags.
You can buy this component here.
|