How to send a mail with attachment

Hi friends,

I am using soa 11.1.1.6
Jdev 11.1.1.6
WebLogic:-11.1.1.6

I want generated e-mail with attachment in BPEL 11 g. Here's what I did in my bpel process

Create processes bpel from simple Hello world.

In the e-mail activity below details are given

< name of scope = "Email1" >
< bpelx:annotation >
< bpelx:pattern = "bpelx:email" patternName > < / bpelx:pattern >
< / bpelx:annotation >
< variables >
< variable name = "varNotificationReq".
messageType = "ns1:EmailNotificationRequest" / >
< variable name = "varNotificationResponse".
messageType = "ns1:ArrayOfResponse" / >
< variable name = "NotificationServiceFaultVariable".
messageType = "ns1:NotificationServiceErrorMessage" / >
< / variables >
< name of sequence = sequence of '1' >
< assign the name = "EmailParamsAssign" >
< copy >
< expression = "string ('Default')" / >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload / ns1:FromAccountName" / >
< / copy >
< copy >
< expression = "" string ()"/ >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload / ns1:Bcc" / >
< / copy >
< copy >
< from expression = "string ('[email protected]')" / >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload / ns1:Cc" / >
< / copy >
< copy >
< expression = "" string ()"/ >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload / ns1:ReplyToAddress" / >
< / copy >
< copy >
< expression = "string ('testing')" / >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload / ns1:Subject" / >
< / copy >
< copy >
< from expression = "string ('[email protected]')" / >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload/ns1: to" / >
< / copy >
< copy >
< delivery > < xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < MimeType xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > multipart/mixed < / MimeType > < ContentBody xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < MultiPart xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < BodyPart xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < MimeType xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < ContentBody xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < BodyPartName xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < / BodyPart > < BodyPart xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" > < MimeType xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < ContentBody xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < BodyPartName xmlns = "http://xmlns.oracle.com/ias/pcbpel/NotificationService" / > < / BodyPart > < / MultiPart > < / ContentBody > < / content / > < / from >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = ' / EmailPayload/ns1: Content "/ >
< / copy >
< copy >
< from expression = "string (" text/html; Charset = UTF-8 ")" / >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [1] / ns1:MimeType" / >
< / copy >
< copy >
< from expression = "" Hi"" / >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [1] / ns1:ContentBody" / >
< / copy >
< copy >
< expression = "string (' application/xml'); "/ >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [2] / ns1:MimeType" / >
< / copy >
< copy >
< expression = "string ('result.xml')" / >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [2] / ns1:BodyPartName" / >
< / copy >
< copy >
< expression = "bpws:getVariableData('outputVariable','payload','/client:processResponse/client:result')" / >
< variable = part of the "varNotificationReq" = "EmailPayload."
Query = "/ EmailPayload/ns1: Content / ns1:ContentBody / ns1:MultiPart / ns1:BodyPart [2] / ns1:ContentBody" / >
< / copy >
< / assign >
< call name = "InvokeNotificationService".
portType = "ns1:NotificationService."
partnerLink = "NotificationService1."
variableentree = "varNotificationReq".
outputVariable = "varNotificationResponse."
operation = "sendEmailNotification" / >
< / sequence >
< / scope >


I'm able to generate E-mail with an attachment, but I do not see that the xml data in the attached file yet the file size is 64 b.

I think I need to convert the data before sending it as an attachment. Could someone help me please by generating the XML.

Kind regards
Tarak

Hi Tarak,

You need not specify the MIME Type such as application/xml you don't read a .xml file.

I'm assuming you are trying to send the result with its XML form variable in the attachment. So, follow the following steps to achieve the same (basically only first steps as my blog).

-Open the e-mail from the Design view activity and go to the Attachments tab
-Define the MIME Type such as text/plain; (no need to set as xml) and the name of the attachment as result.xml (what you do already)
-The content to write this:

ora:getContentAsString(bpws:getVariableData('outputVariable','payload'))

ora: getContentAsString() function returns you the resulting data in its xml form.

Be sure to check changes to the source code also like my Jdeveloper, they don't think is in Design view. Test and let me know if the problem persists.

Kind regards
Neeraj Sehgal

Tags: Fusion Middleware

Similar Questions

  • How to send a mail with attachment no matter what file use the invoke in os 6.0?

    Hello

    There is some issue that how to send a mail with attachment to use the invoke method in os 6.0?

    "I use the Transport at this time mail send successfully, but I use the invoke to throw this error time these error ismail service does not support these tyes of change of parts joined the send using field or remove attachments ' so how do?

    Thank you

    Hi, rishabh

    Thanks.i got the solution and super work Super-Duper hit.

    Thnaks,

    Umang.

  • Send a mail with attachment

    How can I send you an email with an attachment, a photo for example

    It's a way to do this in OUTLOOK: -.

    http://Office.Microsoft.com/en-GB/novice/lets-attach-files-to-an-outgoing-email-HA010376900.aspx?CTT=1

    If you use a different messaging system, then it should work in a similar manner to the above.

  • why I get this error message: "[{'success': true, 'attachmentFailure': false, 'isSuccess': true, 'attachTooLarge': false}]" when I send a mail with attachment

    Opens a separate window, and this message.

    Start Firefox in Safe Mode {web link}
    While you are in safe mode;

    Type of topic: preferences< enter > in the address bar

    Select Advanced > General.
    Find and stop using hardware acceleration.

    Search web sites secure. Are there problems?

  • Create a trigger that send mail with attachment after insertion of a line in Oracle APEX

    I want to create an insert after trigger on a table that is to send a mail with an attachment. Here is my code.

    CREATE OR REPLACE TRIGGER tr_feedback

    AFTER INSERT on REVIEWS

    FOR EACH LINE

    DECLARE

    l_id NUMBER;

    BEGIN

    l_id: = APEX_MAIL. SEND)

                    p_to        => ' [email protected] ',

    P_FROM = >: NEW. E-mail

    p_subj = >: NEW. Object

    p_body = > "Please see the attachment."

    p_body_html = > ' review of < b > please < /b > the attachment ")

    APEX_MAIL. ADD_ATTACHMENT (p_mail_id = > l_id,)

    p_attachment = >: NEW. FILE,

    p_filename = >: NEW. FILE NAME,

    p_mime_type = >: NEW. MIME);

    END;

    But when I insert data, I get the following error:

    ORA-20022: Null value provided for the parameter p_filename.

    ORA-06512: at "APEX_040200.WWV_FLOW_MAIL", line 1070

    ORA-06512: at "APEX_040200.WWV_FLOW_MAIL_API", line 141

    ORA-06512: at "TR_FEEDBACK", line 11

    ORA-04088: error during execution of trigger 'TR_FEEDBACK '.

    Now, how can I fix that? Thanks in advance.

    Agree with the above.  Triggers (ab) should not be used in this way.  Nontransactional process should not be based on a transactional trigger.  These processes are part of the business logic and should be at the level of the company of codification (Summit, you can add a process to be executed once the completed insertion)

  • Windows live mail error - failed to send e-mails with attachments

    This is the error message I get

    An unknown error has occurred.

    "Object ' subject.xlsx [1/2]"
    Server error: 554
    Server response: 554 5.6.1 Messages of type message / partial are not supported
    Server: 'smtp.outlook.com '.
    Windows Live Mail error ID: 0x800CCC6F
    Protocol: SMTP
    Port: 587
    Secure (SSL): Yes

    I have disabled mail scanning in norton antivirus - I don't have any other anti-virus software.
    I increased the length of the server timeout.
    Neither helped.

    Send email without an attachment without problem.

    Any help is appreciated!

    Hi Vineeth,

    Thank you for your response. I've since found the cause and I am now able to send e-mails with attachments new!
    It's to do with the message is divided into parts - so nothing to do with Norton, fortunately.

    Mary

  • I tried to send an email with attachment and without attachment and received the "windows live Hotmail was not able to complete this application. "Microsoft may contact you about problems that report you.

    I tried to send an email with attachment and without attachment and received the error "windows live Hotmail was not able to complete this application. "Microsoft may contact you about problems that report you.

    Hi AbdiNur,

    This forum is for comments on the Microsoft Answers site.  As your question is on Hotmail, I recommend posting your question on the forums for Hotmail:

    http://www.windowslivehelp.com/forums.aspx?ProductID=1

    Thank you for using Microsoft Answers!

  • Question of sending e-mail with Treo Pro

    I always have the same problem with T-Mobile by sending emails. I have all my settings correct and with incoming and outgoing servers (using T-Mobile) and I can only receive, not send them. I'm extremely frustrated with that by the way I think about the passage of carriers to Verizon and get rid of the phone. Don't get me wrong, I've always loved Palm and treo. I thought that if I got the unlocked version of the Pro, it would work just as my Treo 755 has no problem. The only thing really different between the Pro and the 755 is now that it is running Windows Mobile software vs of the Palm (and of course all the improvements). I really need help on this cause I am actually count the days here until I change provider and go BlackBerry. Someone keep me a person of Palm and help out me! Thank you!

    Have you deleted the email account and re-create it to see if you can e-mail?  Get the Cannot Connect to server error?

    Is a known issue with WinMo 6.1 on sending e-mails with some e-mail providers that a fix has been posted here:

    http://www.Microsoft.com/downloads/details.aspx?FamilyId=d9d71b2e-d2dd-44F2-86e5-1e53aad7fb7a&displaylang=en

    This patch is not a ROM update, so each time a hard reset is done this patch will need to be reinstalled.

    Message edited by thetreoguy on 03/27/2009 18:40
  • How to 'Submit' = send a w / hyperlink vs e-mail with attachment?

    Is it possible to make a submit button iniate:

    -an e-mail with a hyperlink to the shape (the file is stored on a network drive)

    Instead of

    -an email, including a copy of the file of the form as an attachment

    ?

    Thank you

    You can add hyperlinks to an e-mail message created in Acrobat. You can add the URL

    like plain text, though.

    In addition, the sending of an email without the file as an attachment is possible in

    Acrobat, not in the drive. Use app.mailMsg () to do this.

  • How to send a large file attachment using iCloud mail

    I try to send an email with an attachment. The file size is 29.8 and message indicates the size of the file is greater than the limit of 28.5.  I can't find the mailbox. How can I find box mailbox?  Is there anything else I can do?

    Are you connect to your iCloud account, when you try to send the attachment of t? So little should be automatic:

    Send large attachments by using the mailbox

    You can use the mailbox to send files that exceed the maximum size allowed by your ISP email account . Mailbox post large attachments to iCloud, where they are encrypted and stored for 30 days.

    • If you have an iCloud account and you're connected to iCloud when you click on send, mail will automatically send the attachments using the mailbox. Mail attachments do not count against your storage iCloud.
    • If you have not an iCloud account, or if you are not connected, Mail asking you if you want to use the mailbox (always use send, select "no longer request for this account").

    If a recipient using Mail in OS X Yosemite or later, attachments are included with your message. For the other beneficiaries, your message includes links to download attachments and their expiry date.

    You can activate the mailbox or disable an account. Choose Mail > Preferences, click accounts, select the account, click Advanced, and then select or deselect the option "send large attachments with box.

  • Cannot send mail with attachment from message reads the operation failed an object could not be found

    Unable to send an email with a photo attachment. Once all the steps to configure the e-mail was followed and press on send, the message reads 'the operation failed.  An object cannot be found.

    Hello

    Welcome to the Microsoft Answers site. Please take a look at the following address:
    http://support.Microsoft.com/kb/312354/en-us
    If only it was not fixed, so it's more probablyy caused by an Antivirus/Firewall. Symantec Antivirus seems to cause this issue often (as well as other AVs). In this case, try to disable the mailscanner in your Antivirus and see if that solves the problem. Or disable the Antivirus add-ins related via Outlook. See here how to proceed:
    http://Office.Microsoft.com/en-us/Outlook-help/enable-or-disable-add-ins-in-Office-programs-HA010034127.aspx#BM9

    I hope this helps.

  • Sending E-Mail with an attachment using PL/SQL

    Hello

    I am trying to send an E-Mail with an attachment using pl/sql on Oracle 9i.
    I found the code from the link below.
    http://www.orafaq.com/wiki/Send_mail_from_PL/SQL
    but the attachment it sends is defined in the pl/sql block.
    I want to attach a file in a different location. How can I do this?

    Thanks in advance

    If the attachment is also on the server (it must be on the server), you can load into a BLOB and which attach to your e-mail (you will need to create an Oracle Directory that points to the file to be attached).

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:255615160805 #68529763836665
    This thread is big enough, a ctrl + f there might give you some clues.

    Currently I do not have the mail api available on here, but I still have it on a "test/playground DB", so I'll take a look later, when I have time and place.

  • When I try to send an e-mail with attached pictures, I am told that the photos will not appear in the e-mail message.

    When I try to send an e-mail with pictures, a pop-up window appears when I hit SEND and says that the photos will not appear in the e-mail message.  How can I fix it?

    original title: e-mail problems.

    Hello

    I suggest that ask you your question on the following link.

    http://answers.Microsoft.com/en-us/windowslive

  • I tried to send an email with attachment and keep trying now and ends not to try the loop a little...

    I tried to send a mail, but something happens and I can't stop the action of 'send message '. The problem is my account does not work and he creates something like a loop... try and try, and I cannot use mail...

    Quit or Force Quit Mail, disconnect from the Internet, or turn off Wifi if it's how sign you, Start Mail, then you should get a chance to remove it, eventually the attachment is too big?

  • Why is sending e-mails with attachments slow

    Hello

    The context of this question is:

    • I had an Apple iMac for a little more than 3 years;
    • and I use "Mail" application to send/receive emails;
    • but it is not uncommon, when I send an email with one or several attachments all the e-mail does not receive to the recipient;
    • and after working with Apple and nowhere;
    • I am now using Thunderbird instead of Mail.

    I love Thunderbird, but I noticed that if I send an email with an attachment (an example is an email that I just sent with an attachment 2.6 MB), it takes some time to both (a) first of all send and then (b) copy the email to my folder 'send '.

    Are there changes 'settings', that I can do to speed things up, or do I just a bigger machine? (I noticed that over the years 3 +, I got the iMac, it is gradually slower and slower.)

    Concerning

    John Bugler

    Download of attachments usually takes much more time compared to the download, with most of the connections and has little to do with age or the quality of your material.

    If you have outgoing mail analysis antivirus software, which could slow down the process; Disabling outgoing mail analysis and see if that makes a difference.

    If your email service automatically copies sent to a folder IMAP messages sent (Gmail, Hotmail), you should uncheck "places a copy in" under the tools/account settings /AccountName/Copies & records to avoid duplicates and download additional time.

    In addition, if the IMAP account and your folder "sent" is important or not compacted, it may take more time to update (download a large file that is sent to the remote server). In this case, you can move messages sent to a separate IMAP or local folder. With POP accounts, sent messages are stored on the local computer and then go very fast.

Maybe you are looking for