Sending Attachment via oracle mail packages

Hi,
I am using utl_smtp and utl_tcp pacakges to send an e-mail. I would like to send an attachment through it, is this possible? and if yes how do i do it?
Thanks.

Jens,
I am frequent visitor and contributor to this forum.
About the link, I waned to try the same thing as I never tried this before and I am getting some hickups.
May be you can help as you seem to be familiar with this subject,
1. I down loaded the two java packages one for mail and one for activation from Java web site.
2. Executed the down loads which provided me with mail.jar and activation.jar
3. Zipped them again using Winzip as per Tom's suggestion(this may be where I may be doing some thing wrong).
4. Transfered the mail.zip and activation.zip to my UNIX server and have our DBA try loading the files under SYS account. It is throwing error, following is the loading endeavor just for mail.zip, the other one just similar.
$ loadjava -u sys/manager -o -r -v -f -noverify -synonym -g public mail.zip
initialization complete
loading  : mail.jar
creating : mail.jar
Error while creating resource mail.jar
    ORA-29547: Java system class not available: oracle/aurora/rdbms/Compiler
resolver : 
Error while turning off verifier
    ORA-06576: not a valid function or procedure name
loadjava: 2 errorsAny ideas?
I will appreciate any help in this regard.
Thx,
SriDHAR

Similar Messages

  • Send attachment from oracle mail....

    i got sample code --
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "SendMail" AS
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class SendMail {
    // Sender, Recipient, CCRecipient, and BccRecipient are comma-separated
    // lists of addresses. Body can span multiple CR/LF-separated lines.
    // Attachments is a ///-separated list of file names.
    public static int Send(String SMTPServer,
    String Sender,
    String Recipient,
    String CcRecipient,
    String BccRecipient,
    String Subject,
    String Body,
    String ErrorMessage[],
    String Attachments) {
    // Error status;
    int ErrorStatus = 0;
    // Create some properties and get the default Session;
    Properties props = System.getProperties();
    props.put("mail.akadia.com", SMTPServer);
    Session session = Session.getDefaultInstance(props, null);
    try {
    // Create a message.
    MimeMessage msg = new MimeMessage(session);
    // extracts the senders and adds them to the message.
    // Sender is a comma-separated list of e-mail addresses as per RFC822.
    InternetAddress[] TheAddresses = InternetAddress.parse(Sender);
    msg.addFrom(TheAddresses);
    // Extract the recipients and assign them to the message.
    // Recipient is a comma-separated list of e-mail addresses as per RFC822.
    InternetAddress[] TheAddresses = InternetAddress.parse(Recipient);
    msg.addRecipients(Message.RecipientType.TO,TheAddresses);
    // Extract the Cc-recipients and assign them to the message;
    // CcRecipient is a comma-separated list of e-mail addresses as per RFC822
    if (null != CcRecipient) {
    InternetAddress[] TheAddresses = InternetAddress.parse(CcRecipient);
    msg.addRecipients(Message.RecipientType.CC,TheAddresses);
    // Extract the Bcc-recipients and assign them to the message;
    // BccRecipient is a comma-separated list of e-mail addresses as per RFC822
    if (null != BccRecipient) {
    InternetAddress[] TheAddresses = InternetAddress.parse(BccRecipient);
    msg.addRecipients(Message.RecipientType.BCC,TheAddresses);
    // Subject field
    msg.setSubject(Subject);
    // Create the Multipart to be added the parts to
    Multipart mp = new MimeMultipart();
    // Create and fill the first message part
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText(Body);
    // Attach the part to the multipart;
    mp.addBodyPart(mbp);
    // Attach the files to the message
    if (null != Attachments) {
    int StartIndex = 0, PosIndex = 0;
    while (-1 != (PosIndex = Attachments.indexOf("///",StartIndex))) {
    // Create and fill other message parts;
    MimeBodyPart mbp = new MimeBodyPart();
    FileDataSource fds =
    new FileDataSource(Attachments.substring(StartIndex,PosIndex));
    mbp.setDataHandler(new DataHandler(fds));
    mbp.setFileName(fds.getName());
    mp.addBodyPart(mbp);
    PosIndex += 3;
    StartIndex = PosIndex;
    // Last, or only, attachment file;
    if (StartIndex < Attachments.length()) {
    MimeBodyPart mbp = new MimeBodyPart();
    FileDataSource fds = new FileDataSource(Attachments.substring(StartIndex));
    mbp.setDataHandler(new DataHandler(fds));
    mbp.setFileName(fds.getName());
    mp.addBodyPart(mbp);
    // Add the Multipart to the message
    msg.setContent(mp);
    // Set the Date: header
    msg.setSentDate(new Date());
    // Send the message;
    Transport.send(msg);
    } catch (MessagingException MsgException) {
    ErrorMessage[0] = MsgException.toString();
    Exception TheException = null;
    if ((TheException = MsgException.getNextException()) != null)
    ErrorMessage[0] = ErrorMessage[0] + "\n" + TheException.toString();
    ErrorStatus = 1;
    return ErrorStatus;
    } // End Send Class
    } // End of public class SendMail
    /

    Assuming there is no question being asked there:
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt

  • Sending a file (.pdf) as an attachment via e-mail

    Hi,
    I have a selection screen with purchase order number as "select-options" and 2 radio buttons one for downloading and opening the SAP Script output to the local file and the other raido button would convert the SAP Script output into .pdf file and send that file as an attachment via e-mail to the receipent(only one).
    I'm through with the first operation. Now need to know about the e-mailing procedure and the function module(s) to be used and their import, export, etc. parameters.
    Thanks & Regards,
    Rajesh

    Re: Sending a PDF document as an attachment
    refer the above thread.
    the useful FMs in this regard are
    CONVERT_OTF
    SO_NEW_DOCUMENT_ATT_SEND_API1 to send mails with attachments:

  • Sending attachment Via Email

    Hi All,
    I have a requirement where in i need to send an email from teh service ticket. The email will be triggered basedon status change to To be Approved. While the email is sent to approver, is it possible to pick the attachment linked to service ticket and add to email as an attachment. is this possible technically..any pointers on how to achive this would be of great help...
    thanq..
    Regards,
    Udaya..

    Udaya,
    I'm not going to give you all the coding details , but I have techically done this before for an activity and here is the recipe for your case:
    1) Create a new z-action profile for the transaciton type
    2) Copy the standard CL_DOC_PROCESSING_CRM_ORDER over to a z-version
    3) Copy the method from that class called CRM_SRVORDER_EXEC_SMART_FORM to a version called EMAIL_SRV_ORDER
    4) Copy the standard smartform used for the service profile to a zed version
    5) Configure a new smart forms mail action to send an e-mail using the new processing class
    6)  Now here is the fun part, you will actually re-code the method to excute the form, but not send out via e-mail.  You will capture the smartform output as OTF and then convert to ASCII to become the body of your e-mail.
    7) Next you will read the attachment for the e-mail message using he CL_CRM_DOCUMENTS class into memory
    8) Finally you will build an e-mail message via separate function module which will be called in a separate task(to avoid issuing  a commit work in the action), using CL_BCS message classes.
    Your end-result is your "action" will generate an e-mail with an attachment.  This isn't way too difficult and I estimate about one week to do. 
    Take care,
    Stephen

  • MF8500C error after scanning and trying to send it via e-mail

    Hi guys,
    I have a problem with a MF8500C. I try to scan some docs and send it via e-mail. First, I scan them, then I add an e-mail and try to send it. Afterall the message is not sent, but one page is printed (attached below). The report says nothing special (only the word "Error" )...
    Any clue what do I do wrong? There is a WIFI connection (I can print docs via WiFi).
    TIA

    Hi, lukaszcysewski!
    Welcome to The Canon Forums, and thank you for your inquiry!
    We appreciate your participation, though we need to let you know that your product seems to be a model that is not supported by our team here at Canon USA.
    The Canon Forum is hosted and moderated within the United States by Canon USA. We are only able to provide support for Canon products manufactured for and used within the US market.
    If you live outside the United States, please click here and select your country or region for your support needs.
    Feel free to discuss Canon products sold outside of the United States, but please be aware that you will not receive support directly from Canon USA.
    Thanks for choosing Canon!

  • ECC 6.0 with baseline - send PO via e-mail

    Hi forum experts,
    We are having some problems with configuring our system to send POs via e-mail. We are trying to use the following setting, but when the PO is saved (and triggers an output) an error appears without any items in processing log. No e-mail is queued in SOST.
    Medium: 5 - external send
    Program: YBAA_FM06P.
    FORM routine: ENTRY_NEU
    Form: <blank>
    PDF/Smartform form: YBAA_MMPO
    When performing a normal "Print output, medium 1", the PO is successfully printed.
    When changing the program to SAPFM06P, a sapscript form is successfully genereated and queued as an e-mail. We simply don't get it to work using program YBAA_MMPO.
    Are we using the correct program? I have read som discussion threads about it and some experts have suggested to use program /SMB40/FM06P instead. That does not work either.
    Best regards and thanks in advance for your help!
    Magnus

    Hi,
    You are using PDF/Smartform form: YBAA_MMPO for  your PO output and to send mail.
    Use t.code:NACE,select application EF.
    1.Now for your Output type, keep Replacement of text symbols give programm as SAPMM06E and Form Routine as TEXT_SYMBOL_REPLACE in General data  TAB.
    2. Keep Communication Method as CS01
    3. Keep entry of medium as 5 and function as VN
    4.For subject of the mail goto Mail Title and Texts give PO No. &EKKO-EBELN& .
    5.Keep condition record with your PO output type and have medium 5 with function VN
    6. For sending PO by e-mail- you should an e-mail ID in your vendor master
    Regards,
    Biju K

  • My wife and I both have iPhone5 verizon phones. When I take a video, no matter how short or long and iMessage or MMS it to her it comes in very blurry. If I send it via e-mail it is still blurry. If I send it to her fathers Iphone4 it is crystal clear.

    My wife and I both have iPhone5 verizon phones. When I take a video, no matter how short or long and iMessage or MMS it to her it comes in very blurry. If I send it via e-mail it is still blurry. If I send it to her fathers Iphone4 it is crystal clear. Clear when sent to any other smart phone too. please help us.

    Try using the app Viber, i sent a video from my iphone 5 to my sisters Acer phone via this Viber app and she got the 3minute video perfect. I imagine they will allow as many minutes of a video that ya want to send

  • Can't send iMessage via E-mail

    I can't send iMessage via E-mail.
    There is no possiblity of typing '@' '.' etc.
    Sending new message (iMessage) looks like this:
    Everyting is activated.

    My only other suggestions is add the email to a contact in your phone.  When you type that contact's name, their email show pop-up below as an option.  If that doesn't work, I don't know. Sorry.

  • I have lost ability in the share module to send photos via e-mail  from my catalogue to selected addresses

    I have lost the ability  in the share module to send photos via e-mail to selecred addresses. I have checked my settings and everything seems in order but still does not work, can I just reinstall elements 10 over my original elements 10 to repair

    Hi Bob,
    If you are using Windows Live Mail (WLM) 2011 then I think you may need the fix mentioned in this document to enable WLM in the Elements sharing preferences.
    https://helpx.adobe.com/photoshop-elements/kb/freeze-or-error-no-email.html
    If you want,m you can update to Windows Live Mail 2012 from here
    Windows Essentials - Download Windows Live Essentials
    When you try to send an image using Photomail, how far do you get and what happens?
    Brian
    Edit: The fix mentioned in the first reference above seems to have dropped out of the system. It is probably best to go for the 2012 version which doesn't need the fix.
    Brian

  • Sending smartforms as PDF attachement via e mail

    Hello all:
    I have configured PPF actions to send smartforms as PDF attchment via e mail it works fine in one client.
    But when I copied the transport to another client, the entries in field 'Recipient' in the configuration step 'Define Conditions and Output Parameters for Comm. of Cust.Shipm. & Cust.Dcl'  are not copied to the new client. I had maintained the name of the inbox folder that has e mail addresses in this field. Any one has a similar issue ? Or is this similar to the number ranges and not transportable and we have to maintain them in every client. Any insight into this very much appreciated.

    Hello:
    If you want to send the smartform as a PDF attachment, configure your PPF action as described below:
    Step 1: Define Techn. Medium for Msgs (PPF Actions) f. Cust. Shipm. and Cust. Decl.
                In the action definition, choose processing type as 'External Communication'
                                                             form type:  'Smart Forms'
                                                             format: /SAPSLL/FORM_PROC
                                                             personalization type: 2 object specific....
                Make this action definition partner function dependent and create a Z partner function. Maintain that  
                partner function in this definition.
    Step 2: Define Conditions and Output Parameters for Comm. of Cust.Shipm. & Cust.Dcl
                Select Communication Method: Internet Mail
                          Mail Settings: send status: 3
    Configure the reamaining PFF actions as usual.
    This will work if that configured partner function is maintained in the customs declaration. And for that business partner, maintain the e mail address in the address dependent section via txn BP.

  • Send Attachment via mail

    Hi All,
    My requirement is to send the contents of an internal table as an attachment via mail to an external mail address.
    I am working in SAP version 3.1H.
    Would anybody provide a sample code of how to do so?
    regards,
    Paul

    Hi,
    If you require small example you can also have look on the
    following sample code which will post internal table data as attachment. Please not email address has to be customised in the <b>SAP usermaintaince.</b>
    FORM send_mail.
      it_doc_chng-obj_name  = text-016.
      it_doc_chng-obj_descr = text-016.
      DESCRIBE TABLE it_objtxt LINES g_lines.
      READ TABLE it_objtxt INDEX g_lines.
      it_objpack-doc_size = ( g_lines - 1 ) * 255 + STRLEN( it_objtxt ).
      it_objpack-doc_type   = 'RAW'.
      APPEND it_objpack.
      it_objpack-head_start = 1.
      it_objpack-head_num   = 0.
      it_objpack-body_start = 1.
      it_objpack-transf_bin = 'X'.
      it_objpack-body_num   = g_lines.
      it_objpack-doc_type   = 'RAW'.
      it_objpack-obj_name   = 'ATTACHMENT'.
      it_objpack-obj_descr  = g_file.
      APPEND it_objpack.
    completing the recipient list
      SORT it_vmail.
      DELETE ADJACENT DUPLICATES FROM it_vmail.
      IF l_client NE 'P'.
        it_reclist-receiver = p_email.
        it_reclist-express =  'X'.
        it_reclist-rec_type = 'U'.
        APPEND it_reclist.
      ELSE.
        LOOP AT it_vmail.
          it_reclist-receiver = it_vmail-smtp_addr.
          it_reclist-express =  'X'.
          it_reclist-rec_type = 'U'.
          APPEND it_reclist.
        ENDLOOP.
      ENDIF.
      it_rec_mail[] = it_reclist[].
      IF NOT p_copy IS INITIAL.
        it_reclist-receiver = p_copy.
        it_reclist-express =  'X'.
        it_reclist-copy =  'X'.
        it_reclist-rec_type = 'U'.
        APPEND it_reclist.
      ENDIF.
      CLEAR it_download[].
      it_download[] = it_objtxt[].
    **********Sending the mail with attachment*****************
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_MAPI'
        EXPORTING
          document_data              = it_doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_objpack
          contents_bin               = it_objtxt
          contents_txt               = it_objtxt
          receivers                  = it_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
      CASE sy-subrc.
        WHEN 0.
          IF p_update = 'X'.
            PERFORM reference_update.
          ENDIF.
         PERFORM down_load.
          WRITE:/01 text-019.
          SKIP.
          LOOP AT it_rec_mail.
            FORMAT COLOR 5 INTENSIFIED OFF.
            WRITE:/01 text-010,20 it_rec_mail-receiver.
          ENDLOOP.
          ULINE.
        WHEN 1.
          WRITE: / text-012.
        WHEN 2.
          WRITE: / text-013.
        WHEN 4.
          WRITE: / text-014.
        WHEN OTHERS.
          WRITE: / text-015.
      ENDCASE.
      REFRESH:it_objpack,
              it_objtxt,
              it_reclist,
              it_rec_mail.
      CLEAR:it_objpack,
            it_objtxt,
            it_reclist,
            g_lines,
            it_rec_mail.
    ENDFORM.                    " send_mail
    Regards
    Suresh Babu Karanam

  • Messaging Plan needed to send photos via e-mail?

    I'm new to the mobile broadband community and would like to know if I can attach photos taken on my phone to an e-mail.  I have little interest in transmitting photos from my phone to other phones and I do not use text, so I am thinking I really don't need to get a messaging plan.  Right or wrong?

    Yes absolutely. You can always attach a photo via an E-mail just as you would on a computer. However, remember the size of the photos you are sending [i.e. File size!]. Sending a photo via E-mail will count towards your data cap whatever that may be on your plan. Photos, several of them, and just E-mail attachments in general can add up quickly so be sure to stay under your data limit to avoid extra fees.
    Happy E-mailing,
    --kwm1337

  • Send Attachment via background job

    Hi,
    Is there any function module/program  in SAP where we can send attachment to external parties via scheduled background job?
    Thank you.

    Dear YEO WEI KOK,
    Please check the following link: 
    http://www.sap-img.com/abap/sending-mail-with-attachment-report-in-background.htm
    Hope this helps you.
    Do award points if you found them useful.
    Regards,
    Rakesh

  • ERROR MESSAGE WHEN TRYING TO SEND IPHOTO VIA E-MAIL

    DRIVING ME NUTS, CAN ANYONE ASSIST? TRYING TO SEND PHOTO'S FROM MY IPHOTO ACCOUNT VIA E-MAIL KEEP GETTING SERVER DOES NOT RECOGNISE ACCOUNT/PASSWORD MESSAGE. ALSO I-CLOUD ACCOUNT REFUSES TO ALLOW ME TO SELECT MAIL FROM MAIL, CONTACTS & CALENDARS PREFERENCE
    THANKS
    TED

    First unlock your caps lock key. Typing in all caps is inappropriate in online forums (considered shouting) and is hard to read.
    iPhoto>Preferences>General. Select the email program or how you wish to email photos from iPhoto.
    (There is an iPhoto forum for iPhoto questions).

  • Sending attachment in a mail using SO_DOCUMENT_SEND_API1

    Hi,
    I am trying to send an attachment in a mail using the FM SO_DOCUMENT_SEND_API1.
    The contents of the body and the attachement are same.
    The contents of the body are coming in proper format but the attachements are not.
    The body contents are in this way:
    1000013559     0010004994     PBG BROOKF     1000013559     000100     010052000328667000     GA LQ CRE 20OZ 24CS FRT PUN              0.000     CS
    1000013559     0010004994     PBG BROOKF     1000013559     000200     010052000328681000     GA LQ CRE 20OZ 24CS LL              0.000     CS
    But the attachement contents are:
    1000013559     0010004994     PBG BROOKF     1000013559     000100     010052000328667000     GA LQ CRE 20OZ 24CS FRT PUN
             ⸀        䌀匀ഀ਀                                                                                                         u2020
    1000013559     0010004994     PBG BROOKF     1000013559     000200     010052000328681000     GA LQ CRE 20OZ 24CS LL
        ⸀        䌀匀ഀ਀                                                                                                              u2020
    Also the last 2 fields which are quantity and unit fields, are not coming at all in the attachment.
    Please help me solve this issue.
    Thanks,
    Abhishek

    what is the document type of attachment? is it excel?

Maybe you are looking for