Home > Contents > Index >
mail:attachment
Includes an attachment to the SMTP email message sent by mail:send.
Syntax
<mail:attachment [name="name of attachment"] value="attachment" />Parameters
name (optional)
- Name of the attachment. Only specify this parameter if attachment is a
String
. If attachment is aFile
orFTVAL
object, do not specifyname
.
value (required)
- Value of attachment. This parameter can be a
String
,File
, orFTVAL
object.
Description
Use as an inner tag of mail:send to add attachments to email.
Example
This example adds a text file as an attachment in an email sent to cory.
<mail:send to="cory@email.com" > <mail:attachment value='<%=new File("readme.txt")%>'/> </mail:send>
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.