Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEAPI\apex_mail001.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>ADD_ATTACHMENT Procedure</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T17:32:16Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="ADD_ATTACHMENT Procedure" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12510-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface" title="Home" type="text/html" /> <link rel="up" href="apex_mail.htm" title="APEX_MAIL" type="text/html" /> <link rel="up" href="apex_mail001.htm" title="ADD_ATTACHMENT Proce..." type="text/html" /> <link rel="prev" href="apex_mail.htm" title="Previous" type="text/html" /> <link rel="next" href="apex_mail002.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface" title="Home">Home</a> > <a href="apex_mail.htm" title="APEX_MAIL">APEX_MAIL</a> > ADD_ATTACHMENT Proce...</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="apex_mail.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_mail002.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="CHDHCEGF" name="CHDHCEGF"></a></p> <hr /> <div class="refsect1"> <h1><a name="AEAPI343" id="AEAPI343"></a>ADD_ATTACHMENT <a id="sthref494" name="sthref494"></a><a id="sthref495" name="sthref495"></a><a id="sthref496" name="sthref496"></a>Procedure</h1> <p>This procedure sends an outbound email message from an application as an attachment. To add multiple attachments to a single email, <code>APEX_MAIL.ADD_ATTACHMENT</code> can be called repeatedly for a single email message.</p> <a id="sthref497" name="sthref497"></a> <p class="subhead2">Syntax</p> <pre xml:space="preserve" class="oac_no_warn"> APEX_MAIL.ADD_ATTACHMENT( p_mail_id IN NUMBER, p_attachment IN BLOB, p_filename IN VARCHAR2, p_mime_type IN VARCHAR2); </pre> <a id="sthref498" name="sthref498"></a> <p class="subhead2">Parameters</p> <p><a href="#CHDCHEEH">Table: ADD_ATTACHMENT Parameters</a> describes the parameters available in the <code>ADD_ATTACHMENT</code> procedure.</p> <div class="tblformal"><a id="sthref499" name="sthref499"></a><a id="CHDCHEEH" name="CHDCHEEH"></a> <p class="titleintable">ADD_ATTACHMENT Parameters</p> <table class="Formal" title="ADD_ATTACHMENT Parameters" summary="This table describes the parameters available in ADD_ATTACHMENT." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t5">Parameter</th> <th align="left" valign="bottom" id="r1c2-t5">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t5" headers="r1c1-t5"> <p><code>p_mail_id</code></p> </td> <td align="left" headers="r2c1-t5 r1c2-t5"> <p>The numeric ID associated with the email. This is the numeric identifier returned from the call to <code>APEX_MAIL.SEND</code> to compose the email body.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t5" headers="r1c1-t5"> <p><code>p_attachment</code></p> </td> <td align="left" headers="r3c1-t5 r1c2-t5"> <p>A <code>BLOB</code> variable containing the binary content to be attached to the email message.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t5" headers="r1c1-t5"> <p><code>p_filename</code></p> </td> <td align="left" headers="r4c1-t5 r1c2-t5"> <p>The filename associated with the email attachment.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t5" headers="r1c1-t5"> <p><code>p_mime_type</code></p> </td> <td align="left" headers="r5c1-t5 r1c2-t5"> <p>A valid MIME type (or Internet media type) to associate with the email attachment.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <a id="sthref500" name="sthref500"></a> <p class="subhead2">Examples</p> <p>The following example demonstrates how to access files stored in <code>APEX_APPLICATION_FILES</code> and add them to an outbound email message</p> <pre xml:space="preserve" class="oac_no_warn"> DECLARE l_id NUMBER; BEGIN l_id := APEX_MAIL.SEND( p_to => 'fred@flintstone.com', p_from => 'barney@rubble.com', p_subj => 'APEX_MAIL with attachment', p_body => 'Please review the attachment.', p_body_html => '<b>Please</b> review the attachment'); FOR c1 IN (SELECT filename, blob_content, mime_type FROM APEX_APPLICATION_FILES WHERE ID IN (123,456)) LOOP APEX_MAIL.ADD_ATTACHMENT( p_mail_id => l_id, p_attachment => c1.blob_content, p_filename => c1.filename, p_mime_type => c1.mime_type); END LOOP; COMMIT; END; / </pre></div> <!-- class="refsect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="apex_mail.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_mail002.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de