Email with attachments QPAC: setting "From" using process data doesn't work

Hi,
I trying to set the "From" in the Email with attachments QPAC from a process variable, let's call it "mailagent", which is of type xs:string.
So I use a set value QPAC, which sets the "mailagent" variable to "[email protected]". The workflow then continous with the Email QPAC.
Which stalls and throws the following exception:
javax.mail.MessagingException: 501 Syntax error, parameters in command "MAIL FROM:<{$/process_data/@mailagent$}>" unrecognized or missing
Hrm. I thought, I had already used the Email QPAC this way.
Is there some kind of magic to apply to the Email with attachments QPAC in order for it to accept process data in the "From"?
Steve

Yes, I'm sure, it worked for us to. But it obviously no longer does.
Yes, "mailagent" definitely is a variable of type string, though it's of type
xs:string. I'm no longer able to create variables, which don't feature the
xs namespace. Which is quite confusing as I've got absolutely no idea, what the
xs is used for.
We are using LiveCycle Workflow 7.2.1, the Email QPAC is 7.0.2. Is this the latest version?
Steve

Similar Messages

  • I'm using OS 10.6.8 and Mail 4.5. When I receive mails with attachments which are visible the save button doesn't work. Some contacts have problems opening files sent by me using Mail too. This was never a problem on pre-Intel. A real Mac **** up !

    I'm using OS 10.6.8 and Mail 4.5. When I receive mails with attachments which are visible the save button doesn't work. And some contacts occasionally have problems opening files sent by me using Mail too. This was never a problem on pre-Intel Mac. A real Mac **** up ! Any ideas ?

    Can you drag and drop the attachments visible in the email to the Desktop OK or does that fail ?
    Re the sending: Are these recipients on Mac's or PC's as the file type could be an issue, if on Mac's then try setting the Mail Preferences Composing setting to Plain Text not Rich Text and see if that improves things.

  • Email with Attachments - the FROM address

    Hello,
    I am using the Email with Attachments QPAC and filled out the FROM tab with my email address that I want to use. However, when the email is sent, the FROM email being used is the one that is configured for the Workflow Server. So, why is the FROM address specified in the QPAC not being used or what is the point of this From tab? I would assume we can specify something differently from the Workflow Server's email?
    Thank you,
    Jennifer

    Hi
    There is some weirdness in the logic of the Email QPAC.
    Populate the "Login Name" field in the QPAC with some dummy data, and then uncheck the checkbox that says "Use Authentication". The QPAC will ignore the Login name, but will start observing the from address.
    Weird, but it seems to work.
    Thanks to Michael Sherwood for the workaround.
    howard
    http://www.avoka.com

  • Send emails with attachments residing in the network

    Hi All,
    My requirement is to send email with attachments. I am using javamail and it works fine only if the attachment resides in the local machine.
    If the attachment resides in the network [the folder is shared by the user], the application gives me IOException.
    Please help. Let me know if I am not clear.

    Please find the trace below . Also I am able to browse the share but haven't tried writing a test app.
    javax.mail.MessagingException: IOException while sending message
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:595)
    at javax.mail.Transport.send0(Transport.java:169)
    at javax.mail.Transport.send(Transport.java:98)
    at SendEmail.sendMail(SendEmail.java:66)
    at FetchDetails.fetchResultSet(FetchDetails.java:69)
    at FetchDetails.<init>(FetchDetails.java:36)
    at Index.main(Index.java:3)
    Caused by: java.io.FileNotFoundException: \xxx.xxx.xx.xxx\dinesh\dialog.gif (The
    system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at javax.activation.FileDataSource.getInputStream(FileDataSource.java:80
    at javax.activation.DataHandler.writeTo(DataHandler.java:287)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1248)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:747)
    at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:361)
    at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:85
    at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:83
    9)
    at javax.activation.DataHandler.writeTo(DataHandler.java:295)
    at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1248)
    at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1673)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:555)
    ... 6 more
    Cant send mail. IOException while sending message

  • SOA Suite 11g - Email with attachments (Attachment from SOAP attachment)

    Hello,
    Can any one please help as to how I can do the following in Oracle SOA 11g:
    Using a BPEL process how can I send an Email with attachments where the attachment itself is coming from a SOAP attachment.
    The back ground is that we have portal sites from where the users can upload a document and then from their a SOA service is invoked and the attachment would be passed as (SOAP attachments) and then emails have to be send to users containing this uploaded document as the attachment.
    Thanks.
    feel free to email me [email protected]

    Yes, I need all supported standards and their version of SOA Suite 11g because my customer wants to upgrade from 10g to 11g, especially all supported standards and version number of OBPM 11g and OBPM 10g.
    A people has pasted all support standards and version number of OBPM 10g. I get a standard list of OSB.
    OBPM 11g supports:
    BPEL
    xml 1.0
    Servlet 2.3\JSP1.2 (J2EE 1.2),
    Servlet 2.4\JSP2.0(J2EE 1.4),
    Servlet 2.5\JSP2.1(Java EE 1.5)
    UDDI
    SOAP
    WSDL
    WS-BPEL for People
    XML Schema
    XPDL
    SOAP
    XQuery
    XLIFF
    XSL map
    XSLT
    UML
    Ant
    EJB 2.1, JPA/EJB 3.0
    JAAS
    Spring
    JAXB 1.0, JAXB 2.0
    XHTML
    HTML
    JSP
    JSF
    JSR-168
    XSQL
    WS-Policy
    But I cannot find the document about version number of the above standards

  • I am using a mac mini (10.8.3) with Mac Mail 6.3 (1503).  Whenever I try to forward an email with attachments, the attachments do not make it.  They show being sent, but the attachments never are sent.

    Hey Guys,
    The title says it all.  Whenever I receive an email with attachments, I will try to forward the email to someone with the attachments.  Mac Mail shows that the attachments are attached, but the receiver says the attachments are not there. Our mail host is Rackspace.  We are setup with IMAP.  It should be noted that we are experiencing similar issues with OS 10.5.8 with Mac Mail 3.6 (936).
    We assumed Rackspace was the problem, so we logged into their webmail portal and tested it and the attachments were received as normal, which points everything back to Mac Mail.  We even had an ISP change but the problem do not change.
    I have researched the problem, and there seems to be evidence of this being a known bug with Mac Mail, but I am hoping there is a workaround.  The company is unwilling to move to a different mail client since they use Daylite 4, which does not support Thunderbird.

    Back up all data.
    1. Triple-click the line below to select it:
    ~/Library/Mail/Bundles
    Right-click or control-click the highlighted line and select
    Services ▹ Open
    from the contextual menu. A folder may open, or you may get an error message that the item can't be found. Either result is normal. If the folder does open and has contents, move the contents to the Desktop. Relaunch Mail and test. If there's no change, put the contents of the folder back and quit Mail again.
    2. Repeat with this line:
    /Library/Mail/Bundles
    This time you may be prompted for your login password when you remove the items. Make sure they're removed from the folder and not just copied to the Desktop. If necessary, copy them first and then move the originals to the Trash.

  • Unable to move email with attachments from local folders to icloud

    I'm in the process of migrating my email to icloud. I've been able to move all emails without attacments from local folders to the cloud but evrytime I try to move emails with attachments I get one of two errors, either the imap server times out or it's unable to establish a secure connection (SSL).
    Anyone else come across this or point me in the right direction.
    And yes - I have been searching Google all afternoon and have not been able to find anything.

    I do not have an answer to your problem but am interested in following this thread because I would like to get off the Mail application and do everything in iCloud.  My problem is I have a ton of messages in Mail folders, on my MacAir. I don't know how to get them to iCloud folders.  At this point I keep the attachments in folders on the HD so I don't need the attachments to come but I do need the message.

  • Send email with attachments from oracle procedure

    This is my procedure
    CREATE OR REPLACE PROCEDURE send_parvo_email IS
    v_header varchar2(200);
    v_file UTL_FILE.FILE_TYPE;
    v_count Number;
    v_letter Varchar(50);
    req UTL_HTTP.REQ;
    req1 UTL_HTTP.REQ;
    resp UTL_HTTP.RESP;
    resp1 UTL_HTTP.RESP;
    url VARCHAR2 (2000);
    url1 VARCHAR2 (2000);
    val varchar2(4000);
    val1 varchar2(4000);
    p_start_date DATE;
    p_end_date DATE;
    v_shipment_id varchar2(30);
    --v_start_date  DATE;
    --v_end_date DATE;
    Cursor C1 is select shipment_id
    from ship_hdr
    where trunc(create_time) = trunc(sysdate);
    BEGIN
    v_letter := 'r_parvo_b19_rpt';
    select trunc(sysdate-7),trunc(sysdate-2)
    into p_start_date,p_end_date
    from dual;
    Open C1;
    Fetch C1 into v_shipment_id;
    Close C1;
    save_parvo_email;
    UTL_HTTP.SET_PROXY (null,null);
    url :=
    utl_url.ESCAPE
    ( 'http://hbc-maroon.heartlandbc.org/reports/rwservlet?userid=test/[email protected]&subject="Parvo Testing Report"&destype=mail&FROM=[email protected]&desname=[email protected]&desformat=PDF&ENVID=QA&report='||v_letter||'&start_date='||p_start_date||'&end_date='||p_end_date);
    req := UTL_HTTP.BEGIN_REQUEST (url);
    UTL_HTTP.SET_HEADER (req, 'User-Agent', 'Mozilla/4.0 Oracle');
    resp := UTL_HTTP.GET_RESPONSE (req);
    UTL_HTTP.READ_LINE (resp, val, TRUE);
    UTL_HTTP.END_RESPONSE (resp);
    Update ship_dtl
    set shipment_printed = 'Y'
    where shipment_printed is null
    and trunc(coll_date) between p_start_date and p_end_date;
    commit;
    END;
    This works fine and sends email with the report as attachment. The attachment is report_name.pdf. I want to change this attachment to be named as shipment_id.pdf. Is this possible and how?
    If there is any other method to sent email with attachments . ie run the report and attach the report to the email not as report_name.rdf but shipmenmt_id.rdf

    This is my procedure
    CREATE OR REPLACE PROCEDURE send_parvo_email IS
    v_header varchar2(200);
    v_file UTL_FILE.FILE_TYPE;
    v_count Number;
    v_letter Varchar(50);
    req UTL_HTTP.REQ;
    req1 UTL_HTTP.REQ;
    resp UTL_HTTP.RESP;
    resp1 UTL_HTTP.RESP;
    url VARCHAR2 (2000);
    url1 VARCHAR2 (2000);
    val varchar2(4000);
    val1 varchar2(4000);
    p_start_date DATE;
    p_end_date DATE;
    v_shipment_id varchar2(30);
    --v_start_date  DATE;
    --v_end_date DATE;
    Cursor C1 is select shipment_id
    from ship_hdr
    where trunc(create_time) = trunc(sysdate);
    BEGIN
    v_letter := 'r_parvo_b19_rpt';
    select trunc(sysdate-7),trunc(sysdate-2)
    into p_start_date,p_end_date
    from dual;
    Open C1;
    Fetch C1 into v_shipment_id;
    Close C1;
    save_parvo_email;
    UTL_HTTP.SET_PROXY (null,null);
    url :=
    utl_url.ESCAPE
    ( 'http://hbc-maroon.heartlandbc.org/reports/rwservlet?userid=test/[email protected]&subject="Parvo Testing Report"&destype=mail&[email protected]&[email protected]&desformat=PDF&ENVID=QA&report='||v_letter||'&start_date='||p_start_date||'&end_date='||p_end_date);
    req := UTL_HTTP.BEGIN_REQUEST (url);
    UTL_HTTP.SET_HEADER (req, 'User-Agent', 'Mozilla/4.0 Oracle');
    resp := UTL_HTTP.GET_RESPONSE (req);
    UTL_HTTP.READ_LINE (resp, val, TRUE);
    UTL_HTTP.END_RESPONSE (resp);
    Update ship_dtl
    set shipment_printed = 'Y'
    where shipment_printed is null
    and trunc(coll_date) between p_start_date and p_end_date;
    commit;
    END;
    This works fine and sends email with the report as attachment. The attachment is report_name.pdf. I want to change this attachment to be named as shipment_id.pdf. Is this possible and how?
    If there is any other method to sent email with attachments . ie run the report and attach the report to the email not as report_name.rdf but shipmenmt_id.rdf

  • How can i secure email with attachments using coldfusion

    Hi,
    I need to send emails with attachments containg word, excel or PDF documents using cfmail. However this email needs to be really secure. How is the best way to secure the entire email with its attachments.
    Any ideas appreciated
    Thanks
    Zubair

    Hi ,
    I hope the following will help you..., using the UTL_SMTP db package.
    DECLARE
    c UTL_SMTP.CONNECTION;
    PROCEDURE send_header(name IN VARCHAR2, header IN VARCHAR2) AS
    BEGIN
    UTL_SMTP.WRITE_DATA(c, name || ': ' || header || UTL_TCP.CRLF);
    END;
    BEGIN
    -- Open connection to SMTP gateway
    c := UTL_SMTP.OPEN_CONNECTION('smtp.server.acme.com');
    UTL_SMTP.HELO(c, 'acme.com');
    UTL_SMTP.MAIL(c, '[email protected]');
    UTL_SMTP.RCPT(c, '[email protected]');
    UTL_SMTP.OPEN_DATA(c);
    send_header('From', '"Oracle Admin" ');
    send_header('To', '"Bob Smith" ');
    send_header('Subject', 'Automated Database Email');
    UTL_SMTP.WRITE_DATA(c, utl_tcp.CRLF || 'This is an automated email from the Oracle database.');
    UTL_SMTP.WRITE_DATA(c, utl_tcp.CRLF || 'The database is working for you!');
    UTL_SMTP.CLOSE_DATA(c);
    UTL_SMTP.QUIT(c);
    END;
    Simon

  • Problem When Forwarding Email Attachments / Email With Attachments

    I posted a response in a related thread that describes my problem, but have found no solution so I thought I should create a new thread and solicit direct advice for this issue.
    I sync 2 (sometimes 3) Yahoo Email accounts to my iPhone 4. Due to firewall issues at work accessing 'personal email', I often email myself files as attachments, then forward them to others using my iPhone. Having recently upgraded from iPhone 3G to 4, now when I forward an email with attachments, the attachments get zapped to 0B and effectively do not forward. It may show an icon or have the file, but it's an empty file. I always select "Include Attachments" when it asks, but the functionality is not working the way it is supposed to.
    I've tried forwarding .xls .doc and .zip files so far. Even a small 180kB file won't forward.
    The only exception seems to be if I click the attachment, let it fully download, then forward the email. That works for 'standard' types of files, but I didnt have to do this step in the previous iOS, so I am wondering - Is that normal now?
    What about other types of files besides office and adobe? If the iPhone doesn't have support for me to view the file on my phone, I can't "download" it before forwarding. Example is a zip file. It shows as a "?" in my email, so I cant download it, so when I forward it it kills the attachment.
    Regardless what the phone supports to view, if I just want to forward an email from the server along to someone else, it should have the freakin' attachments! This doesn't seem to be the case for all situations though.
    Would seriously appreciate a confirmation others have this issue (go ahead, try to send yourself a zip file and then just forward it back to your PC) and any solutions that might explain how to correct this problem. Maybe there's a server setting or another way of setting up the email accounts that would fix it.
    Thanks all

    Being able to forward as an attachment would be such a useful feature. Forward as in-line text works but this is no good if you want to retain the original email headers or smime content.
    One prime example is the use of SpamCop.net where you need to be able to send the original mail (including headers) for SPAM processing. Forward as attachment is the easiest way to do this.
    Come on Apple, please help us, without the "Forward as Attachment" it make it difficult for us to quickly report SPAM or forward documents. Can it really be that hard to implement?
    Vote... Vote...

  • Fetching email with attachments in Tomcat

    I'm trying to process emails with attachments using following code and it works fine in standalone java application, but when I run this code on Tomcat it treates all messages as not multipart. Class of all contents got from messages is SharedByteArrayInputStream.
    I'm using jdk1.6.0_27 and javamail1_4_5
    I put mail.jar in WEB-INF/lib of my war.
    Can anyone help my how to deal with this? What's wrong?
    package test;
    import java.util.Arrays;
    import java.util.List;
    import java.util.Properties;
    import javax.mail.Folder;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Store;
    public class Main {
    private static Store store;
    private static Folder folder;
    * @param args
    * @throws Exception
    public static void main(String[] args) throws Exception {
    try {
    List<Message> messages = getMessages("...", "...", "...");
    for (Message mess : messages) {
    System.out.println(mess.getSentDate());
    Object content = mess.getContent();
    if (content instanceof Multipart) {
    System.out.println("miltipart");
    } else {
    System.out.println("plain");
    } finally {
    close();
    public static List<Message> getMessages(String host, String userName, String password) throws Exception {
    if (store != null || folder != null) {
    throw new IllegalStateException("There are open and closed messages exist");
    // create empty properties
    Properties props = new Properties();
    // get session
    Session session = Session.getDefaultInstance(props, null);
    try {
    // get the store
    store = session.getStore("pop3");
    store.connect(host, userName, password);
    // get folder
    folder = store.getFolder("INBOX");
    folder.open(Folder.READ_ONLY);
    // get directory
    return Arrays.asList(folder.getMessages());
    } catch (MessagingException e) {
    throw new Exception("Exception while mail receiving ", e);
    public static void close() throws MessagingException {
    // close connection
    if (folder != null) {
    folder.close(false);
    if (store != null) {
    store.close();
    folder = null;
    store = null;
    }

    But I found another interesting issue.
    When I run my application everything works fine on first iteration. According to my code I get default instance of Session, get Store, get Folder and at last getMessages. After processing messages I close folder and store.
    But if I don't restart my application and try to get messages again all of the SAME messages became plain (SharedByteArrayInputStream) again (as it was earlier).
    If I restart my application first iteration works fine and others fails.
    In both iterations used the same instance of class where I put Thread.currentThread().setContextClassLoader(BaseEmailService.class.getClassLoader());
    What I must reinitialize to make it works on each iteration?

  • Mail not receiving emails with attachments

    Hi
    I'd appreciate any suggestions in relation to the following.
    My wife and I both run computers from the one account, Mail on her PowerBook logging in through my name and password. Until recently, we have had no problems at all. However, it has come to light that my wife has not been receiving emails with attachments for some time. To test this, my wife sent an email with an attachment to her home email address from work, and copied it to me. I received the email and the attachment on my PC; my wife's Mac did not receive the email. I then forwarded the email with the attachment to her computer; this was successful. This would suggest some problem with her Mail account on the Mac. However, the configuration has not been changed. Is it possible for it just to stop working for some reason?

    I'm using a PC for my email at the moment. I'm not sure if all my wife's emails have been downloaded. However, Mail has made a Home/Mail/MessageUidsAlreadyDowloaded file. This was created when I sent an email to test what happened. I was unable to make Mail download all her emails, so I guess they must have gone from the server. She has a different email address to mine, but it's run from the same ISP account; as I said, she logs in, automatically, through Mail to her email. I have contacted the ISP about it, but they are unable to see any trace of emails that colleagues have sent my wife and which she sends home to herself. All of these files happen to have attachments, but I cannot see any setting of Mail which would account for them being rejected. Also, I can't be entiurely sure that only emails with attachments don't get through; there may be others, 'unattached'.
    Thanks for your continued assistance.

  • How to send Email with attachments

    Hi im Trying to send a file as attachment using EMail Activity operator.
    Can we do it using Email activity? If yes, then how can we do it? If no, then please tell me about any other method using which i can send a email with attachments.
    Regards
    Vibhuti

    Better late than never, a comprehensive demo on the topic:
    REM
    REM maildemo.sql - A PL/SQL package to demonstrate how to use the UTL_SMTP
    REM package to send emails in ASCII and non-ASCII character sets, emails
    REM with text or binary attachments.
    REM
    REM Note: this package relies on the UTL_ENCODE PL/SQL package in Oracle 9i.
    CREATE OR REPLACE PACKAGE demo_mail IS
      ----------------------- Customizable Section -----------------------
      -- Customize the SMTP host, port and your domain name below.
      smtp_host   VARCHAR2(256) := 'smtp-server.some-company.com';
      smtp_port   PLS_INTEGER   := 25;
      smtp_domain VARCHAR2(256) := 'some-company.com';
      -- Customize the signature that will appear in the email's MIME header.
      -- Useful for versioning.
      MAILER_ID   CONSTANT VARCHAR2(256) := 'Mailer by Oracle UTL_SMTP';
      --------------------- End Customizable Section ---------------------
      -- A unique string that demarcates boundaries of parts in a multi-part email
      -- The string should not appear inside the body of any part of the email.
      -- Customize this if needed or generate this randomly dynamically.
      BOUNDARY        CONSTANT VARCHAR2(256) := '-----7D81B75CCC90D2974F7A1CBD';
      FIRST_BOUNDARY  CONSTANT VARCHAR2(256) := '--' || BOUNDARY || utl_tcp.CRLF;
      LAST_BOUNDARY   CONSTANT VARCHAR2(256) := '--' || BOUNDARY || '--' ||
                                                  utl_tcp.CRLF;
      -- A MIME type that denotes multi-part email (MIME) messages.
      MULTIPART_MIME_TYPE CONSTANT VARCHAR2(256) := 'multipart/mixed; boundary="'||
                                                      BOUNDARY || '"';
      MAX_BASE64_LINE_WIDTH CONSTANT PLS_INTEGER   := 76 / 4 * 3;
      -- A simple email API for sending email in plain text in a single call.
      -- The format of an email address is one of these:
      --   someone@some-domain
      --   "Someone at some domain" <someone@some-domain>
      --   Someone at some domain <someone@some-domain>
      -- The recipients is a list of email addresses  separated by
      -- either a "," or a ";"
      PROCEDURE mail(sender     IN VARCHAR2,
               recipients IN VARCHAR2,
               subject    IN VARCHAR2,
               message    IN VARCHAR2);
      -- Extended email API to send email in HTML or plain text with no size limit.
      -- First, begin the email by begin_mail(). Then, call write_text() repeatedly
      -- to send email in ASCII piece-by-piece. Or, call write_mb_text() to send
      -- email in non-ASCII or multi-byte character set. End the email with
      -- end_mail().
      FUNCTION begin_mail(sender     IN VARCHAR2,
                    recipients IN VARCHAR2,
                    subject    IN VARCHAR2,
                    mime_type  IN VARCHAR2    DEFAULT 'text/plain',
                    priority   IN PLS_INTEGER DEFAULT NULL)
                    RETURN utl_smtp.connection;
      -- Write email body in ASCII
      PROCEDURE write_text(conn    IN OUT NOCOPY utl_smtp.connection,
                     message IN VARCHAR2);
      -- Write email body in non-ASCII (including multi-byte). The email body
      -- will be sent in the database character set.
      PROCEDURE write_mb_text(conn    IN OUT NOCOPY utl_smtp.connection,
                     message IN            VARCHAR2);
      -- Write email body in binary
      PROCEDURE write_raw(conn    IN OUT NOCOPY utl_smtp.connection,
                    message IN RAW);
      -- APIs to send email with attachments. Attachments are sent by sending
      -- emails in "multipart/mixed" MIME format. Specify that MIME format when
      -- beginning an email with begin_mail().
      -- Send a single text attachment.
      PROCEDURE attach_text(conn         IN OUT NOCOPY utl_smtp.connection,
                   data         IN VARCHAR2,
                   mime_type    IN VARCHAR2 DEFAULT 'text/plain',
                   inline       IN BOOLEAN  DEFAULT TRUE,
                   filename     IN VARCHAR2 DEFAULT NULL,
                      last         IN BOOLEAN  DEFAULT FALSE);
      -- Send a binary attachment. The attachment will be encoded in Base-64
      -- encoding format.
      PROCEDURE attach_base64(conn         IN OUT NOCOPY utl_smtp.connection,
                     data         IN RAW,
                     mime_type    IN VARCHAR2 DEFAULT 'application/octet',
                     inline       IN BOOLEAN  DEFAULT TRUE,
                     filename     IN VARCHAR2 DEFAULT NULL,
                     last         IN BOOLEAN  DEFAULT FALSE);
      -- Send an attachment with no size limit. First, begin the attachment
      -- with begin_attachment(). Then, call write_text repeatedly to send
      -- the attachment piece-by-piece. If the attachment is text-based but
      -- in non-ASCII or multi-byte character set, use write_mb_text() instead.
      -- To send binary attachment, the binary content should first be
      -- encoded in Base-64 encoding format using the demo package for 8i,
      -- or the native one in 9i. End the attachment with end_attachment.
      PROCEDURE begin_attachment(conn         IN OUT NOCOPY utl_smtp.connection,
                        mime_type    IN VARCHAR2 DEFAULT 'text/plain',
                        inline       IN BOOLEAN  DEFAULT TRUE,
                        filename     IN VARCHAR2 DEFAULT NULL,
                        transfer_enc IN VARCHAR2 DEFAULT NULL);
      -- End the attachment.
      PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                      last IN BOOLEAN DEFAULT FALSE);
      -- End the email.
      PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection);
      -- Extended email API to send multiple emails in a session for better
      -- performance. First, begin an email session with begin_session.
      -- Then, begin each email with a session by calling begin_mail_in_session
      -- instead of begin_mail. End the email with end_mail_in_session instead
      -- of end_mail. End the email session by end_session.
      FUNCTION begin_session RETURN utl_smtp.connection;
      -- Begin an email in a session.
      PROCEDURE begin_mail_in_session(conn       IN OUT NOCOPY utl_smtp.connection,
                          sender     IN VARCHAR2,
                          recipients IN VARCHAR2,
                          subject    IN VARCHAR2,
                          mime_type  IN VARCHAR2  DEFAULT 'text/plain',
                          priority   IN PLS_INTEGER DEFAULT NULL);
      -- End an email in a session.
      PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection);
      -- End an email session.
      PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection);
    END;
    CREATE OR REPLACE PACKAGE BODY demo_mail IS
      -- Return the next email address in the list of email addresses, separated
      -- by either a "," or a ";".  The format of mailbox may be in one of these:
      --   someone@some-domain
      --   "Someone at some domain" <someone@some-domain>
      --   Someone at some domain <someone@some-domain>
      FUNCTION get_address(addr_list IN OUT VARCHAR2) RETURN VARCHAR2 IS
        addr VARCHAR2(256);
        i    pls_integer;
        FUNCTION lookup_unquoted_char(str  IN VARCHAR2,
                          chrs IN VARCHAR2) RETURN pls_integer AS
          c            VARCHAR2(5);
          i            pls_integer;
          len          pls_integer;
          inside_quote BOOLEAN;
        BEGIN
           inside_quote := false;
           i := 1;
           len := length(str);
           WHILE (i <= len) LOOP
          c := substr(str, i, 1);
          IF (inside_quote) THEN
            IF (c = '"') THEN
              inside_quote := false;
            ELSIF (c = '\') THEN
              i := i + 1; -- Skip the quote character
            END IF;
            GOTO next_char;
          END IF;
          IF (c = '"') THEN
            inside_quote := true;
            GOTO next_char;
          END IF;
          IF (instr(chrs, c) >= 1) THEN
             RETURN i;
          END IF;
          <<next_char>>
          i := i + 1;
           END LOOP;
           RETURN 0;
        END;
      BEGIN
        addr_list := ltrim(addr_list);
        i := lookup_unquoted_char(addr_list, ',;');
        IF (i >= 1) THEN
          addr      := substr(addr_list, 1, i - 1);
          addr_list := substr(addr_list, i + 1);
        ELSE
          addr := addr_list;
          addr_list := '';
        END IF;
        i := lookup_unquoted_char(addr, '<');
        IF (i >= 1) THEN
          addr := substr(addr, i + 1);
          i := instr(addr, '>');
          IF (i >= 1) THEN
         addr := substr(addr, 1, i - 1);
          END IF;
        END IF;
        RETURN addr;
      END;
      -- Write a MIME header
      PROCEDURE write_mime_header(conn  IN OUT NOCOPY utl_smtp.connection,
                         name  IN VARCHAR2,
                         value IN VARCHAR2) IS
      BEGIN
        utl_smtp.write_data(conn, name || ': ' || value || utl_tcp.CRLF);
      END;
      -- Mark a message-part boundary.  Set <last> to TRUE for the last boundary.
      PROCEDURE write_boundary(conn  IN OUT NOCOPY utl_smtp.connection,
                      last  IN            BOOLEAN DEFAULT FALSE) AS
      BEGIN
        IF (last) THEN
          utl_smtp.write_data(conn, LAST_BOUNDARY);
        ELSE
          utl_smtp.write_data(conn, FIRST_BOUNDARY);
        END IF;
      END;
      PROCEDURE mail(sender     IN VARCHAR2,
               recipients IN VARCHAR2,
               subject    IN VARCHAR2,
               message    IN VARCHAR2) IS
        conn utl_smtp.connection;
      BEGIN
        conn := begin_mail(sender, recipients, subject);
        write_text(conn, message);
        end_mail(conn);
      END;
      FUNCTION begin_mail(sender     IN VARCHAR2,
                    recipients IN VARCHAR2,
                    subject    IN VARCHAR2,
                    mime_type  IN VARCHAR2    DEFAULT 'text/plain',
                    priority   IN PLS_INTEGER DEFAULT NULL)
                    RETURN utl_smtp.connection IS
        conn utl_smtp.connection;
      BEGIN
        conn := begin_session;
        begin_mail_in_session(conn, sender, recipients, subject, mime_type,
          priority);
        RETURN conn;
      END;
      PROCEDURE write_text(conn    IN OUT NOCOPY utl_smtp.connection,
                     message IN VARCHAR2) IS
      BEGIN
        utl_smtp.write_data(conn, message);
      END;
      PROCEDURE write_mb_text(conn    IN OUT NOCOPY utl_smtp.connection,
                     message IN            VARCHAR2) IS
      BEGIN
        utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(message));
      END;
      PROCEDURE write_raw(conn    IN OUT NOCOPY utl_smtp.connection,
                    message IN RAW) IS
      BEGIN
        utl_smtp.write_raw_data(conn, message);
      END;
      PROCEDURE attach_text(conn         IN OUT NOCOPY utl_smtp.connection,
                   data         IN VARCHAR2,
                   mime_type    IN VARCHAR2 DEFAULT 'text/plain',
                   inline       IN BOOLEAN  DEFAULT TRUE,
                   filename     IN VARCHAR2 DEFAULT NULL,
                      last         IN BOOLEAN  DEFAULT FALSE) IS
      BEGIN
        begin_attachment(conn, mime_type, inline, filename);
        write_text(conn, data);
        end_attachment(conn, last);
      END;
      PROCEDURE attach_base64(conn         IN OUT NOCOPY utl_smtp.connection,
                     data         IN RAW,
                     mime_type    IN VARCHAR2 DEFAULT 'application/octet',
                     inline       IN BOOLEAN  DEFAULT TRUE,
                     filename     IN VARCHAR2 DEFAULT NULL,
                     last         IN BOOLEAN  DEFAULT FALSE) IS
        i   PLS_INTEGER;
        len PLS_INTEGER;
      BEGIN
        begin_attachment(conn, mime_type, inline, filename, 'base64');
        -- Split the Base64-encoded attachment into multiple lines
        i   := 1;
        len := utl_raw.length(data);
        WHILE (i < len) LOOP
           IF (i + MAX_BASE64_LINE_WIDTH < len) THEN
          utl_smtp.write_raw_data(conn,
             utl_encode.base64_encode(utl_raw.substr(data, i,
             MAX_BASE64_LINE_WIDTH)));
           ELSE
          utl_smtp.write_raw_data(conn,
            utl_encode.base64_encode(utl_raw.substr(data, i)));
           END IF;
           utl_smtp.write_data(conn, utl_tcp.CRLF);
           i := i + MAX_BASE64_LINE_WIDTH;
        END LOOP;
        end_attachment(conn, last);
      END;
      PROCEDURE begin_attachment(conn         IN OUT NOCOPY utl_smtp.connection,
                        mime_type    IN VARCHAR2 DEFAULT 'text/plain',
                        inline       IN BOOLEAN  DEFAULT TRUE,
                        filename     IN VARCHAR2 DEFAULT NULL,
                        transfer_enc IN VARCHAR2 DEFAULT NULL) IS
      BEGIN
        write_boundary(conn);
        write_mime_header(conn, 'Content-Type', mime_type);
        IF (filename IS NOT NULL) THEN
           IF (inline) THEN
           write_mime_header(conn, 'Content-Disposition',
             'inline; filename="'||filename||'"');
           ELSE
           write_mime_header(conn, 'Content-Disposition',
             'attachment; filename="'||filename||'"');
           END IF;
        END IF;
        IF (transfer_enc IS NOT NULL) THEN
          write_mime_header(conn, 'Content-Transfer-Encoding', transfer_enc);
        END IF;
        utl_smtp.write_data(conn, utl_tcp.CRLF);
      END;
      PROCEDURE end_attachment(conn IN OUT NOCOPY utl_smtp.connection,
                      last IN BOOLEAN DEFAULT FALSE) IS
      BEGIN
        utl_smtp.write_data(conn, utl_tcp.CRLF);
        IF (last) THEN
          write_boundary(conn, last);
        END IF;
      END;
      PROCEDURE end_mail(conn IN OUT NOCOPY utl_smtp.connection) IS
      BEGIN
        end_mail_in_session(conn);
        end_session(conn);
      END;
      FUNCTION begin_session RETURN utl_smtp.connection IS
        conn utl_smtp.connection;
      BEGIN
        -- open SMTP connection
        conn := utl_smtp.open_connection(smtp_host, smtp_port);
        utl_smtp.helo(conn, smtp_domain);
        RETURN conn;
      END;
      PROCEDURE begin_mail_in_session(conn       IN OUT NOCOPY utl_smtp.connection,
                          sender     IN VARCHAR2,
                          recipients IN VARCHAR2,
                          subject    IN VARCHAR2,
                          mime_type  IN VARCHAR2  DEFAULT 'text/plain',
                          priority   IN PLS_INTEGER DEFAULT NULL) IS
        my_recipients VARCHAR2(32767) := recipients;
        my_sender     VARCHAR2(32767) := sender;
      BEGIN
        -- Specify sender's address (our server allows bogus address
        -- as long as it is a full email address ([email protected]).
        utl_smtp.mail(conn, get_address(my_sender));
        -- Specify recipient(s) of the email.
        WHILE (my_recipients IS NOT NULL) LOOP
          utl_smtp.rcpt(conn, get_address(my_recipients));
        END LOOP;
        -- Start body of email
        utl_smtp.open_data(conn);
        -- Set "From" MIME header
        write_mime_header(conn, 'From', sender);
        -- Set "To" MIME header
        write_mime_header(conn, 'To', recipients);
        -- Set "Subject" MIME header
        write_mime_header(conn, 'Subject', subject);
        -- Set "Content-Type" MIME header
        write_mime_header(conn, 'Content-Type', mime_type);
        -- Set "X-Mailer" MIME header
        write_mime_header(conn, 'X-Mailer', MAILER_ID);
        -- Set priority:
        --   High      Normal       Low
        --   1     2     3     4     5
        IF (priority IS NOT NULL) THEN
          write_mime_header(conn, 'X-Priority', priority);
        END IF;
        -- Send an empty line to denotes end of MIME headers and
        -- beginning of message body.
        utl_smtp.write_data(conn, utl_tcp.CRLF);
        IF (mime_type LIKE 'multipart/mixed%') THEN
          write_text(conn, 'This is a multi-part message in MIME format.' ||
         utl_tcp.crlf);
        END IF;
      END;
      PROCEDURE end_mail_in_session(conn IN OUT NOCOPY utl_smtp.connection) IS
      BEGIN
        utl_smtp.close_data(conn);
      END;
      PROCEDURE end_session(conn IN OUT NOCOPY utl_smtp.connection) IS
      BEGIN
        utl_smtp.quit(conn);
      END;
    END;
    /

  • Email with attachments whose path is mentioned in hier seq list

    Hi,
    I am trying to send 3 attachments to an email by using SO_NEW_DOCUMENT_ATT_SEND_API1
    The files are to be picked up from an editable field of header of an hierarchical sequential ALV list. The email with attachments has to be sent on click of a user button 'Send email'.
    Can anyone guide me how to achieve these?
    1) F4 for filepath on the ALV field for hier seq list
    2) The attachments should be the ones mentioned in the file paths of fields f1, f2, f3 resply.
    Currently, the attachments are sent with the mail but are empty and without filenames!
    Part of the code for attachments is pasted below:
    Pack the mail contents and attachment
      lt_packing_list-transf_bin  = space.
      lt_packing_list-head_start  = 1.
      lt_packing_list-head_num    = 0.
      lt_packing_list-body_start  = 1.
      lt_packing_list-body_num    = LINES( objcont ).
      lt_packing_list-doc_type    = 'RAW'.
      APPEND lt_packing_list. CLEAR lt_packing_list.
      lt_packing_list-transf_bin  = 'X'.
      lt_packing_list-head_start  = 1.
      lt_packing_list-head_num    = 1.
      lt_packing_list-body_start  = 1.
      lt_packing_list-doc_type    = 'XLS'. " You can give RAW incase if you want just a txt file.
      lt_packing_list-obj_name    = gt_ppsn_hdr-att1.
      APPEND lt_packing_list. CLEAR lt_packing_list.
    Regards,
    Poonam

    I would like to suggest you , to use this kind of form.... for you sending mail result
        PERFORM send_file_as_email_attachment  USING g_email "Email
              userid "Account SAP
        CHANGING return_error. "Eventually
    *&      Form  send_file_as_email_attachment
          text
         -->P_EMAIL    text
         -->P_ERROR    text
    FORM send_file_as_email_attachment USING p_email
                                             p_parid
                                    CHANGING p_error.
      DATA: f_send_request  TYPE REF TO CL_BCS,
            f_sent_to_all   TYPE OS_BOOLEAN,
            f_xls_content   TYPE SOLIX_TAB,
            f_document      TYPE REF TO CL_DOCUMENT_BCS,
            f_recipient     TYPE REF TO if_recipient_bcs,
            f_bcs_exception TYPE REF TO CX_BCS,
            f_text          TYPE bcsy_text WITH HEADER LINE,
            f_wa_text       TYPE soli,
            f_error         TYPE TABLE OF solisti1 WITH HEADER LINE,
            f_lw_error      LIKE LINE OF f_error,
            f_length        TYPE so_obj_len,
            f_xls_length    TYPE so_obj_len,
            f_subject       TYPE so_obj_des,
            f_n10           TYPE I.
      CONSTANTS:  con_tab TYPE C VALUE cl_abap_char_utilities=>HORIZONTAL_TAB,   "OK for non Unicode
                  con_cret TYPE C VALUE cl_abap_char_utilities=>CR_LF.  "OK for non Unicode
      DATA:
      bxls_string    TYPE string,
      bxls_str      TYPE xstring.
      CHECK NOT p_email IS INITIAL.
    *To send mail the xstring having excel format data
      TRY.
        Create persistent send request
          f_send_request = cl_bcs=>create_persistent( ).
          f_wa_text = TEXT-m01.  
          APPEND f_wa_text TO f_text.   "****** CONTENT OF MAIL
          "Data above populated
          f_subject = TEXT-t01.
          DESCRIBE TABLE f_text LINES f_n10.
          f_n10 = ( f_n10 - 1 ) * 255 + STRLEN( f_text ).
          f_length = f_n10.
          MOVE text-c01 TO f_subject.
          f_document = cl_document_bcs=>create_document(
          i_type    = 'RAW'
          i_text    = f_text[]
          i_length  = f_length
          i_subject = f_subject ).                              "#EC NOTEXT
    ATTACHMENT
    XLS HEADER 
          CLEAR: bxls_string, bxls_str.
          CONCATENATE text-001 text-002 text-003 text-004 text-020 text-017 text-018 text-019
                      text-005 text-006 text-007
                      text-008 text-009 text-010 text-011 text-012 text-013 text-014
                      text-015 text-016 con_cret INTO bxls_string SEPARATED BY con_tab.
          CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
            EXPORTING
              TEXT   = bxls_string
            IMPORTING
              BUFFER = bxls_str
            EXCEPTIONS
              FAILED = 1
              OTHERS = 2.
          IF SY-SUBRC <> 0.
          ENDIF.
    FILE CONTENT
          LOOP AT it_xls_invio.
    Allega ciascun elenco individuato per l'indirizzo mail in elaborazione
            REFRESH f_xls_content.
        Create and set document
            CONCATENATE bxls_str it_xls_invio-xls_str INTO it_xls_invio-xls_str IN BYTE MODE.
            f_xls_content = cl_document_bcs=>xstring_to_solix( it_xls_invio-xls_str ). "String having Excel format
            CALL METHOD f_document->add_attachment
            EXPORTING
              i_attachment_type    = C_FORMATO   "CONSTANT         C_FORMATO(3) VALUE 'XLS'.
              I_ATT_CONTENT_HEX    = f_xls_content
             i_attachment_size    = xls_length
              i_attachment_subject = f_subject.
          ENDLOOP.
          CHECK sy-subrc EQ 0.
        Add document object to send request
          f_send_request->set_document( f_document ).
        Add recipient (e-mail address)
        Create recipient object
          f_recipient = cl_cam_address_bcs=>create_internet_address( p_email ).
        Add recipient object to send request
          f_send_request->add_recipient( f_recipient ).
        Send document
          f_sent_to_all = f_send_request->send( i_with_error_screen = 'X' ).
          COMMIT WORK.
         ENDLOOP.
      Exception handling
      replace this rudimentary exception handling with your own one
        CATCH cx_bcs INTO f_bcs_exception.
          WRITE:/ ' Sending Error'.'
      ENDTRY.
    ENDFORM.                    "send_file_as_email_attachment

  • Mail saving all emails with attachments in "Drafts"

    Since I upgraded to Mavericks (not Maverick or Maverick's...??) Mail has put a copy of every email I send that has an attachment into the "Drafts" folder.  The email has been sent and received by the recipient, and you can find it in the "Sent" folder as well.  Never had this issue before.  I can't find a preference that has any effect on it.
    Any ideas??
    Tks!

    I'm using a PC for my email at the moment. I'm not sure if all my wife's emails have been downloaded. However, Mail has made a Home/Mail/MessageUidsAlreadyDowloaded file. This was created when I sent an email to test what happened. I was unable to make Mail download all her emails, so I guess they must have gone from the server. She has a different email address to mine, but it's run from the same ISP account; as I said, she logs in, automatically, through Mail to her email. I have contacted the ISP about it, but they are unable to see any trace of emails that colleagues have sent my wife and which she sends home to herself. All of these files happen to have attachments, but I cannot see any setting of Mail which would account for them being rejected. Also, I can't be entiurely sure that only emails with attachments don't get through; there may be others, 'unattached'.
    Thanks for your continued assistance.

Maybe you are looking for

  • Error in loading a Hierarchy

    When we are loading a hierarchy in the BW system, we get the following error : Error in the hierarchy structure: see error log. We tried activation of the hierarchy data source then rerun the load. Still it fails with the same error. Please let us kn

  • Arrays or Spreadshee​ts? Help with School Excercise

    Hello there, my Control Systems Engineering professor will make us a LabView test in a couple of weeks, although he won't actually teach us the software, but rather we need to get our hands dirty. Anyways, I'm trying to resolve this excercise: Proble

  • Adding parallel loops programatically

    Hi! I'm building a system with some instruments and I want to use the same instrument-VI for all instruments. One way is to do it set it up as 'Possible solution..' (see image). Is there some way where I can loop through the 'hardware settings'-array

  • Attempting to create a AQ$_JMS_MAP_MESSAGE via PL/SQL

    I'm attempting to create a AQ$_JMS_MAP_MESSAGE via PL/SQL but can't get it to work. I'm able to create a AQ$_JMS_MESSAGE and add it to an AQ (of the correct type) however the AQ$_JMS_MAP_MESSAGE can not be constructed in the same way as it does not h

  • Viewing Daily Show on iPad in Safari

    Can't view show clips because of error: Needs ADOBIE FLASH PLAYER. Notice is; Apple does not support Flash Player on iPhone and iPad. Will this soon change? Is there an app that gives support? Is there another way to watch these segments?