Setting up the File Name of email Attachment from Received File Name

Hello All,
I have to send the Received File in attachment to an Email if there is any exception. Here I can attach the file, but I cannot set the file name of attachment as the Received File Name. Is there anyway of doing this without using custom pipeline component.
Here I am using the Orchestration and SMTP Adapter.Any help is greatly appreciated.
Thanks

It might work if you use a custom pipeline component on your send port and in the Execute method populate the MIME.FileName property of the body part.
Something like:
public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
string filename = inmsg.Context.Read("ReceivedFileName", "http://schemas.microsoft.com/BizTalk/2003/file-properties");
inmsg.BodyPart.PartProperties.Write( "FileName", "http://schemas.microsoft.com/BizTalk/2003/mime-properties", "filename);
return inmsg;
You can take reference from similar post here
SMTP - Setting attachment filename
Anther good article with MIME is here
Setting attachment filename with the SMTP Adapter
For MIME case your SMTP message construct statement would be like below
multipartMessage.MessagePart_1= InMSG;
multipartMessage.MessagePart_2="This is message part2 as a string";
multipartMessage(SMTP.Subject) ="Email From Dynamic Port";
multipartMessage(SMTP.From) ="[email protected]";
multipartMessage(SMTP.SMTPHost) ="yoursmypserver.com";
multipartMessage.MessagePart_2(MIME.FileName) = "Attachment_Name";
multipartMessage(SMTP.SMTPAuthenticate) =0;
Thanks
Abhishek

Similar Messages

  • Changing email name (not email address) from received emails in mail progra

    Is it possible to have a script change the name of the sender? I would imagine it would use the "extract name from" term from within mail.
    I have a friend who's name is questionable and I don't want my kids to see it as it appears.

    I was having this problem for the whole night with my wife's Ipad, which is configured with her yahoo email. Same error message through the Mailer Daemon when she tried to send to my yahoo email.
    After multiple tries, I decided to bite the bullet and delete the email account from her Ipad and then re-add her email on the Ipad. Everything is working fine now.

  • I am trying to set up the ipod to my email account and it keeps saying it won't work, even though we have confirmed user name and password.  Any advice?

    i am trying to set up the ipod to my email account and it keeps saying it won't work, even though we have confirmed user name and password.  Any advice?

    Try deleting the account from the iPod and try reentring all the information again.  A lot of times it is easier to reenter the information rather than trying to find and correct the error.
    Try Googling for how to setup the email account for your provider on an iPhone.  You can try for an iPod Touch but frequently that does not exist.

  • How is it posible to get the File name, size and type from a File out the H

    How is it posible to get the File name, size and type from a File out the HttpServletRequest. I want to upload a File from a client and save it on a server with the client name. I want to conrole before saving the name, type and size of the file.How is it posible to get the File name, size and type from a File out the HttpServletRequest.
    form JSP
    <form name="form" method="post" action="procesuploading.jsp" ENCTYPE="multipart/form-data">
    File: <input type="file" name="filename"/
    Path: <input type="text" readonly="" name="path" value="c:"/
    Saveas: <input type="text" name="saveas"/>
    <input name="submit" type="submit" value="Upload" />
    </form>
    proces JSP
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="FileUploadBean" %>
    <jsp:useBean id="TheBean" scope="page" class="FileUploadBean" />
    <%
    TheBean.doUpload(request);
    %>
    BEAN
    import java.io.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletInputStream;
    public class FileUploadBean {
    public void doUpload(HttpServletRequest request) throws IOException
              String melding = "";
              String filename = request.getParameter("saveas");
              String path = request.getParameter("path");
              PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.java")));
              ServletInputStream in = request.getInputStream();
              int i = in.read();
              System.out.println("filename:"+filename);
              System.out.println("path:"+path);
              while (i != -1)
                   pw.print((char) i);
                   i = in.read();
              pw.close();
    }

    Thanks it works great.
    Here an excample from my code
    import org.apache.commons.fileupload.*;
    public class FileUploadBean extends Object implements java.io.Serializable{
    String foutmelding = "geen";
    String path;
    String filename;
    public boolean doUpload(HttpServletRequest request) throws IOException
         try
         // Create a new file upload handler
         FileUpload upload = new FileUpload();
         // Set upload parameters
         upload.setSizeMax(100000);
         upload.setSizeThreshold(100000000);
         upload.setRepositoryPath("/");
         // Parse the request
         List items = upload.parseRequest(request);
         // Process the uploaded fields
         Iterator iter = items.iterator();
         while (iter.hasNext())
         FileItem item = (FileItem) iter.next();
              if (item.isFormField())
                   String stringitem = item.getString();
         else
              String filename = "";
                   int temp = item.getName().lastIndexOf("\\");
                   filename = item.getName().substring(temp,item.getName().length());
                   File bestand = new File(path+filename);
                   if(item.getSize() > SizeMax && SizeMax != -1){foutmelding = "bestand is te groot.";return false;}
                   if(bestand.exists()){foutmelding ="bestand bestaat al";return false;}
                   FileOutputStream fOut = new FileOutputStream(bestand);     
                   BufferedOutputStream bOut = new BufferedOutputStream(fOut);
                   int bytesRead =0;
                   byte[] data = item.get();
                   bOut.write(data, 0 , data.length);     
                   bOut.close();
         catch(Exception e)
              System.out.println("er is een foutontstaan bij het opslaan de een bestand "+e);
              foutmelding = "Bestand opsturen is fout gegaan";
         return true;
         }

  • Cant open a pdf file as an email attachment

    I need help. I can't open a pdf file as an email attachment. It's like my computer doesn't think reader is installed. I can open an existing file through reader. I have deinstalled and reinstalled reader and am getting the same results.

    You can save the attachment and then open it.
    We can try to help but you haven't mentioned what you are using for your email...

  • I just restored my phone, however I have to sign into icloud and the phone is set to the previous owner's email and password. I am unable to get in contact with them. What can I do?

    I just restored my phone, however I have to sign into icloud and the phone is set to the previous owner's email and password. I am unable to get in contact with them. What can I do?
    Please help!

    Hello codyfromseminole,
    After reviewing your post, I believe your device is under Activaltion Lock. The following article will provide you with more information about the feature:
    iCloud: Activation Lock
    With iOS 7 or later, Find My iPhone includes a feature called Activation Lock, which is turned on automatically when you set up Find My iPhone. Activation Lock makes it harder for anyone to use or sell your iPhone, iPad, or iPod touch if it’s ever lost or stolen. 
    With Activation Lock, your Apple ID and password are required before anyone can:
    Turn off Find My iPhone on your device
    Sign out of iCloud on your device
    Erase and reactivate your device
    Important:    Make sure to remember your Apple ID and password, and that your password is unique and secure—someone else shouldn’t be able to guess it. For more information, see the Apple Support article Security and your Apple ID. 
    If you want to give away or sell your device, be sure to erase your content and settings (in Settings > General > Reset > Erase All Content and Settings). When you erase your content, Find My iPhone and Activation Lock are also turned off. 
    If you no longer have the device, follow the instructions to remove a device you no longer have. For more information, see the Apple Support article What to do before selling or giving away your iPhone, iPad, or iPod touch. 
    For more information about Activation Lock, see the Apple Support article Find My iPhone Activation Lock in iOS 7.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • I can't play wmv files on my mac.  I've downloaded Flip4Mac and set as the default player by clicking on a wmv file in Finder and clicking Command   I. Nothing is working, Help please.

    I've downloaded Flip4Mac and set as the default player by clicking on a wmv file in Finder and clicking Command   I. Nothing is working, Help please.

    Limnos,
    Thanks for your reply. I tried that too and it still doesnt work.  When I click on the wmv file it opens up in a new browser page. There is sound but no video.
    Thank you

  • Some users are experiencing difficulty opening certain docx files sent as email attachments. These files contain content controls to protect data in the document. Could someone please confirm that the content controls are the reason the files won't open.

    Some users are experiencing difficulty opening certain docx files sent as email attachments. These files contain content controls to protect data in the document. Could someone please confirm that the content controls are the reason the files won't open.
    These files open correctly when sent as doc files.
    Thanks

    Congrats to Saeid, Ronen, and Ricardo! Big thank you to all our contributors!
     Transact-SQL Technical Guru - February 2015  
    Saeid Hasani
    T-SQL: How the Order of Elements in the ORDER BY Clause Implemented in the Output Result
    Durval Ramos: "Very well structured and with examples that clarify how a T-SQL statement can change the data output order."
    Richard Mueller: "Good use of Wiki guidelines and great examples."
    Ronen Ariely
    Free E-Books about SQL and Transact-SQL languages
    Richard Mueller: "An excellent collection and a great idea."
    Durval Ramos: "A good initiative. Very useful !!!"
    Ricardo Lacerda
    Declare Cursor (Transact-SQL) versus Window with Over - Running Totals
    - Accumulated Earnings
    Durval Ramos: "The "Window function" sample was well presented, but it was unclear how the chart was generated."
    Richard Mueller: "A new idea that can be very useful. Grammar needs work"
    Also worth a mention were the other entries this month:
    [T-SQL] Retrieve Table List with Number of Rows by
    Emiliano Musso
    Richard Mueller: "Short but sweet solution to basic question."
    Durval Ramos: "A simple T-SQL script, but useful."
    [T-SQL] Search for Missing Values within a Numerical Sequence by
    Emiliano Musso
    Richard Mueller: "Clever solution with good code examples."
    Durval Ramos: "You need add more details about development of the idea and create a "Conclusion" section to easy understanding."
    [T-SQL] Converting Multiple Rows into HTML Format single ROW by
    Maheen Khizar (Bint-e-Adam)
    Durval Ramos: "In some situations, It's need to consume and format HTML tags for a UI, but It's important to remember that Best Practices recommend this formatting process preferably in Presentation Layer"
    Richard Mueller: "A great new idea. Some features need more explanation. Avoid first person."
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Read a file sent as an attachment from CPSC

                       I have a requirement where in CPO has to read a text file sent as an attachment from portal (cisco prime service catalog), Is there a way to query RCdatabase to fetch Document ID and retrive the file and read the file. If this approach is not feasible, is there an alternate way to host the text file in an external location and pulled from there?

    Hi,
    is the next part of the code correct.
    What i mean is packing of the attachment, finding out the size of pdf file and doc type as PDF.
    You can also try below link..
    Link: [http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    Hope this helps.
    Regards,
    -Sandeep

  • Send report as an email attachment from a page

    Hi
    I have page which generates a report based on two filters. After the report is generated, 'I want to send that report as an email attachment from that page, when button is clicked "Send Email"
    Thanks a lot in advance.'

    I accomplished functionality I believe similar to what you are looking for in an application once by querying a report into an html e-mail message. This approach gives you all kinds of flexibility. At least this would be one way of doing it. I am going to include a simplified sample here of what the script looked like. I hope this is at least helpful.
    DECLARE
    l_body_html CLOB;
    BEGIN
    l_body_html :=
    '<html>
    <head>
    <style type="text/css">
    body{font-family: Arial, Helvetica, sans-serif;
    font-size:9pt;
    margin:30px;
    background-color:#ffffff;}
    </style>
    </head><body>
    ' || UTL_TCP.crlf;
    l_body_html :=
    l_body_html || '<table border="1"><tr bgcolor="#999999">
    <th width="75" scope="col">
    Department
    </th>
    <th width="75" scope="col">
    Course
    </th>
    </tr>' || UTL_TCP.crlf;
    FOR c1 IN (SELECT some_table.DEPARTMENT, some_table.COURSE FROM some_table)
    LOOP
    l_body_html :=
    l_body_html || '<tr><td>
    ' || c1.DEPARTMENT || '
    </td>' || UTL_TCP.crlf;
    l_body_html := l_body_html || '<td>
    ' || c1.COURSE || '
    </td>' || UTL_TCP.crlf;
    l_body_html := l_body_html || '</tr>' || UTL_TCP.crlf;
    END LOOP;
    l_body_html := l_body_html || '</table>' || UTL_TCP.crlf;
    apex_mail.send(
    p_to => '<some email address>',
    p_from => '<desired from address here>',
    p_body => NULL,
    p_body_html => l_body_html,
    p_subj => '<desired subject line here>');
    END loop;
    apex_mail.push_queue;
    END;
    Edited by: stbrownOSU on Dec 8, 2009 2:53 PM
    I think something must have happened when I copied and pasted the code from TOAD. I have corrected the above code. Please try it again.

  • HT202058 iphone 6+ somehow has switched my name on emails into my nephew's name. We share a first and last name but not a middle name. For example, my name might be John George Doe and his name John James Doe. How did this happen? How do I correct it.

    iphone 6+ somehow has switched my name on emails into my nephew's name. We share a first and last name but not a middle name. For example, my name might be John George Doe and his name John James Doe. How did this happen? How do I correct it.

    So if the solution recommended by Ralph is not working then the other option is this:
    Please make sure that the emails work correctly when signed into, on a computer
    Then delete the account off your phone - you will not lose the emails
    Reset the phone
    Re add the account back in and see if that helps the issue
    Thanks

  • Sending as email attachment from Word 2013 gets stuck in Outbox

    I am using Office 2013 and use the send document as attachment option within Word to email documents. The documents that I email are from a shared exchange mailbox. Whenever I do this the emails get through to the receiver but are stuck in my personal outbox
    rather than sending and heading to the shared sent box.
    This only occurs when I use this option from Word, eg: I can send Excel attachments from within Excel and it goes to the shared Sent box.
    I am also able to successfully send emails from with Outlook via the shared account.
    I am unable to find any settings in Word that affect this behavior, any ideas?

    Hi,
    Please run Word in Safe Mode to test if it's 3rd-party add-ins related:
    Press Win + R and type “word.exe /safe” in the blank box, then press Enter.
    If there’s no problem in Safe Mode, disable the suspicious add-ins to verify which add-ins caused this issue.
    We can also refer to the link below, to learn more and check the possible settings that may affect this behavior:
    http://www.msoutlook.info/question/278
    Regards.
    Melon Chen
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • When I select files to archive, they move from my file folder, but then I go to the archive folder and it says Empty? Where are those files?

    When I select files to archive, they move from my file folder, but then I go to the archive folder and it says Empty? Where are those files?

    Your account names are probably different on the two Macs. If you know the UNIX command line, open a terminal window and run:
    $ id 
    You should see a line that starts with something like this:
    uid=501(your_user_id_here)
    now check the owner of the folder you copied over:
    $ ls -ld Music
    drwx------+ 8 some_user_id_here  staff  272 May 14 16:08 Music
    Do the IDs match? If not, you could change the ownership. Say your id is "johnsmith"
    $ chown -R johnsmith Music
    Now try and access it with iTunes.

  • Extract email addresses from PDF file?

    Hi,
    Does somebody know if there is any -builtin- way to extract email addressed from PDF file in acrobat?
    I tried 'save as' text/excel but this is a laborious task, especially when the pdf is large!
    Thanks

    I've developed a script that does just that. Have a look here:
    http://try67.blogspot.com/2012/02/acrobat-list-all-email-addresses.html

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

Maybe you are looking for

  • Problem with games in windows

    I'm having a problem running games, and I can't figure out why it's happening or how to fix it. I'm using a base model Macbook, about three weeks old, running Windows XP Home...first with SP2, now with SP3. I had gb of RAM, but I dropped it back down

  • Itunes and Ipod Classic stop before song ends after transfer to new computer

    I purchased a new Windows 7 computer and transferred my library from my XP computer. I restored my library and all seemed well with the world. I synched my IPod classic 120GB with over 8000 songs. I was listening to the IPOD on my docking station whe

  • Place multi-page pdf and resize pages automatically

    Hi everyone, I have an A4 sized multi-page pdf file and I wanted to place the pages of the pdf into a US letter sized Indesign document. I planned to use the placemultipagepdf.jsx script that comes with indesign, to do this. When I place the pages th

  • HT5286 I want to buy a new os x mountain lion for my mac

    Im running of os x lion and no beed to reinstslling maverics which is cant boot and cant install to my mac even im using internet recovery.

  • Migrating Jetform layout to Adobe form layout

    hi, Now am involved  sap 4.7 to ecc6 upgrading project. what are steps to migrate jet forms to adobe forms without affect layout? Thank you.. Regards, B.C.Ganesh