Need text and image in the message

Hi,
I need to send an email with an image and text as part of the message, Ill do the following but it jsut takes the text and as an attachment, how can I include both content in the body of message??
BodyPart texto = new MimeBodyPart();
texto.setContent(fichero, "text/html");
multipart.addBodyPart(texto);
// Procesar la imagen
MimeBodyPart imagen = new MimeBodyPart();
imagen.attachFile("C:/Documents and Settings/Administrador/Mis documentos/Sandra/epinuevo/web/imagenes/logo150px.jpg");
imagen.setHeader("Content-ID", "<figura1>");
MimeBodyPart imagen1 = new MimeBodyPart();
imagen1.setText("Sandra");//.attachFile("C:/Documents and Settings/Administrador/Mis documentos/Sandra/epinuevo/web/imagenes/logo150px.jpg");
imagen1.setHeader("Content-ID", "<nombre>");
multipart.addBodyPart(imagen1);
message.setContent(multipart);
Thanks!!

Milene wrote:
bshannon wrote:
If you're still having trouble, you can find a message created by some other
program that has the overall structure you want, and then copy its structure.I dont understand what do u mean exactly.You want your message to look and behave a certain way.
Find another message (with different content), that looks and behaves similarly to what
you want. Perhaps you can create such a message using another mailer. Or perhaps
you've received a message from someone else that is similar to what you're trying to do.
Then, look at that message using the "view source" function of your mailer. You'll see all
the MIME headers, etc. You can then use a similar MIME structure in your message.
You'll also see the content of the body parts and how the content references images and
URLs. Use a similar technique in your message.
But I was trying to include the image and the text as 2 different MimeBodyPart, now I found a simple solution I add html code as part of the message where there is a reference to the image, all the text in in the code.
But now I have a problem cause I have in that html code an URL as an > but when i recieve the mail the url doesnt work, is there any other funciont to add urls in a special way???
A URL reference like "xxxx.jsp" is implicitly relative to the html page containing the reference.
When you include the html content in a mail message, the reference is relative to the mail
message. That's not what you want. You want the reference to point to your web site. The
simplest solution is to just use a reference like "http://myserver/myurl/xxxxx.jsp".
Note that viewing html in a mail message is not exactly the same as viewing html on a web
page. Different mailers will impose different restrictions on what you can do in the html in a
mail message.

Similar Messages

  • How can I combine a lot of text and images on the same screen?

    How can I combine a lot of text and images on the same screen?  I can get a couple of words on the screen with a graphic but not 10 lines.  I need 10 lines on the page with the image. 

    Priscilla,
    I routinely combine 10 lines of 36 pt bible or lecture text to a suitable background using Boris Title 3D.
    Many times the text is too long to fit the screen using Boris, so I devide it into 2 or more parts with no transition between sections.
    In my case, the text is on the screen as the speaker quotes them.
    David

  • Servlet: send back text and images to the requester

    Hi,
    I need some help about servlet responses.
    I want to send back some text (and maybe some images) back to the requester after a POST request.
    Can you give me some tips ?
    thanks

    aneuryzma wrote:
    I want to send back some text (and maybe some images) back to the requester after a POST request.
    Can you give me some tips ?Tip: Make up your mind. You can only send one thing as the response. If you want to send text, then send text. If you want to send an image, then send an image. In any case you should set the content type to indicate what you're sending.
    You can only send a mixed bag of text and images in the unlikely case that you've defined your own content type along with a client which understands it. Or if you zip them all into a zip archive, or something like that.

  • How can I erase the residual background text and images from the backside of a scanned page?

    How can I erase the residual background text and images from the backside of a scanned page?
    Also, I wanted to know what each subscriptions included as far as my question above is concerned?
    I am trying to edit a scanned page (pdf file) by changing some words and erasing the background from the page that is showing through it since the paper is so thin and want to know which subscription to buy in order to complete these tasks?

    This cannot be done in Reader. I think you will need software like Photoshop. You may be able to get buy with Photoshop Elements, but I haven't used recent versions of that software. Using either software this will not be an automated task.

  • Text and images in the same component?

    Ok... a lil help please :
    into what component can i put text and images at the same time
    as in...
    example, what component could contain data like this :
    Hello this is me <imageofmyself> and this is my house <imageofmyhouse>... bye all !
    thanks in advance,
    Jonathan, a.k.a. Kyraz

    You could use a Swing HTMLPANE or draw it all onto a
    BufferedImage and display that (code posted under 2D graphics thread).
    MArk

  • Printing text and images together on a single page (printjob)

    Hello all,
    how am I able to print both text and images on the same page (defined by one printjob), using the javax.print API?
    It seems that one printjob (one page) can have only one flavor, that is text, or GIF, or JPEG, etc. Since the majority of print jobs out there usually require text and graphics on the same sheet this seems a bit strange.
    I have resorted on creating a PDF file through the iText library, and then printing by converting to GIF (quality is significantly reduced though, not an option), or by using the Acrobat Reader command line from java (looks dangerous for batch printing). My printer does not support printing directly using the PDF flavour.
    So, I solved the problem by converting to PDF, but printing is still cumbersome. Any other ideas?
    Thank you for your time,
    Ari.

    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Stretched text and image with FULL_SCREEN_INTERACTIVE after Air player update

    One of my Air applications uses StageDisplayState.FULL_SCREEN_INTERACTIVE to switch to full screen during the presentation of some sheets.
    Everything worked fine untill some users reported a streching of texts and images in the sheets.
    It turns out that the problem occurs after an update from the Adobe Air Player to 3.1 from  2.7.
    The first screen shots shows the text as it should be, the second screen shot shows the text after the update of the Air Player.
    The code used to go into the Full Screen mode is:
        public function setFullScreenInteractive(fullScreenWidth:int = Constants.INT_SCREEN_WIDTH_SMALL, fullScreenHeight:int = Constants.INT_SCREEN_HEIGHT_SMALL):void
                             s.fullScreenSourceRect = new Rectangle(          0, 0, fullScreenWidth, fullScreenHeight);
            s.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    with  Constants.INT_SCREEN_WIDTH_SMALL = 800 and  Constants.INT_SCREEN_HEIGHT_SMALL = 600.
    I can reproduce the problem on a couple of computers with Windows Xp but it's not happening on all the computers I've tested.
    Any idea how to fix this (without telling my users to Uninstall the current Air Player and reinstall the Air Player 2.7)?
    Regards,
    Bart

    Hi Bart,
    Unfortunately the correct screenshot link appears to broken.  Could you please open a new bug report on this over at bugbase.adobe.com?  Please post back with the URL so that others affected can add their comments and votes.  It would also help if we had a sample project/application that we can reproduce this issue with.  If you'd like to keep this private, please feel free to send it to me directly at [email protected]
    Thanks,
    Chris

  • Resizing text and images with actions and keeping it resized for the next slides, how to?

    Hello everybody,
    I searched over the net and in this support section for a solution to my problem, but i didnt find any, so...here I am asking you experts.
    Through a particular use of different actions I make a logo "compose" in the first slide of my presentation (the logo is composed by text and images that interact), then in the second slide i make it resize so it goes 50% of its size and moves down like a TV logo, in the corner of the slide, and I want it to stay there for all the lenght of the presentation.
    It might be a stupid problem, but I didnt understand how to keep it there, 50% of its size and always in that position. If i duplicate the slide I obviously duplicate the 100%-size-logo, not its 50%-size-version, and if i shrink it in order to make it be 50% of its size the text size doesnt shrink so i have to change the text size manually, but the visual effect is imperfect.
    Lets summarize:
    slide 1: text appears, image appears, the text and the image move and "compose" the logo
    slide 2: the complete logo reduces its size to 50% and moves in the lower corner of the presentation, in the place I want it to be for, lets say, 20 slides
    slide 3: i want to have this logo already reduced in size and in its position, in the right lower corner, but if i try to group the different parts of the composed logo and i try to squeeze them the font doesnt change its size, I only squeeze the area that the text occupies.
    Some help please guys?
    Thanks in advance,
    Dom-
    (add: the problem is kind of similar to this: https://discussions.apple.com/message/9179367#9179367 . the idea of making a slide that contains the logo and text in the exact positions they would be after the move and scale actions is good and that was my first attempt, the probem is that it looks impossible to me to create a second "little" version of the logo that looks exactly the same of the first one that i reduced, so i hope there is some way to tell the app to use "the first logo, only resized the way i want", and thats the point where the problem with the size of the text comes out)

    Hi pritam,
    The “maintain proportions of window for different monitor
    resolutions” property will maintain the proportional size of the front panel
    (its x and y sizes) when opened in a different resolution. The front panel
    objects will not be resized and will appear larger (and may not fit inside the
    front panel) when saved in a higher resolution, and moved to a lower
    resolution. You can use the “Keep window proportions” property to achieve the
    same results.
    To have both the front panel dimensions and front panel
    controls scale, you need to have both the above property and the “scale all
    objects on front panel as the window resizes” selected. The labels will not be
    resized by this.
    I tried using both properties on two monitors and noticed
    that the change does not occur when the resolutions between the monitors are
    different. I had to lower both monitors’ resolution to see the change work
    properly.
    Please post back if you have any questions. Have a great day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • Need help with adding formatted text and images to Crystal Report?

    Here's my scenario:
    I have a customer statement that's generated as a crystal report and that has a placeholder for advertisement. The advertisement is mixture of formatted text and images. Until now we only had one advertisement that was always used on the report. The new requirement is that we would have a pool of hundreds of advertisements and would need to display one specific advertisement on the customer statement based on various marketing criteria. They key is that the advertisement content will be determined programmatically and cannot be hardcoded into the report. I'm using Crystal2008 with .net SDK.
    Here are the solutions I thought of, but I'm still rather lost and would appreciate your help/opinion.
    1) Pass HTML or RTF to the report
    Not really sure if this is possible and how to get it done. Also how would I pass in images? Would display formatting be reliable when exporting to PDF?
    2) Create each add as a subreport and append it programatically
    I actually have this working, but I only know how to append a new section to the end of the report and then load the subreport to the section. I have no other controll of the placement. Is there a way to dynamically load a subreport to a predefined section in the main report? How about adding a dummy subreport in the main report as a placeholder and then replacing it with a different subreport? How could I do this?
    3) Pass an Image to the report
    I would create each advertisement as an image and then would somehow add the image to the report. How would I load the image and control the placement? Could I somehow define a placeholder for the image in the main report-maybe a dummy image to be replaced?
    Thank you.

    Hello Pavel,
    I would got the third way.
    You can use dynamic images in your report.
    Just by changing the URL to the image the image can be changed.
    Please see the [Crystal Manual|http://help.sap.com/businessobject/product_guides/cr2008/en/xir3_cr_usergde_en.pdf] and search for images.
    or directly here
    [Setting a Dynamic Graphic Location Path on an Image Object|https://boc.sdn.sap.com/node/506]
    [Dynamic image and HTTP://|https://boc.sdn.sap.com/node/3646]
    [codesample for .NET|https://boc.sdn.sap.com/node/6000]
    Please also use
    [Crystal Reports 2008 SDK Documentation and Sample Code|https://boc.sdn.sap.com/developer/library/CR2008SDK]
    [Crystal Reports 2008 .NET SDK Tutorial Samples|https://boc.sdn.sap.com/node/6203]
    Hope this helps
    Falk

  • Is the BSP extension better than this solution(Text and Image in Button)?

    Hi guys,
    I have a  concept question to decide whether a BSP extension is needed.
    I want to put text and image in htmlb button, and used the solution like below:
    <%
      data image type ref to cl_htmlb_image.
      data: image_string type string.
      create object image.
      image->id = 'back'.
      image->src = cl_bsp_mimes=>sap_icon( id = '@9S@' ).
      image->tooltip = 'Go back'.
      clear image_string.
      image_string = image->IF_BSP_BEE~RENDER_TO_STRING( page_context ).
            %>
            <xhtmlb:toolbarButton id      = "back"
                                  onClick = "back"
                                  text    = "<%= image_string %>" />
    But this solution is not desired by customer, since they don't think it looks nice. So is it possible to create my own BSP extension to get a nicer element?
    Thanks for any hint.
    Regards,
    Liying

    Hi,
    By a nicer element...did you mean to display a better image...or a nicer image ????
    if yes, the you can upload any image you need and then use it here...
    Tell me if you need more information...!!
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Drag and drop the text and image

    Hi,
    I need help in drag and drop text and image.
    I am able to drag and drop the text and image in doc but  i want to drag the text in text frame and image in image frame only.
    For this how to get textframe id or is there any other way to do this. Pls help me if anyone know how to do this one.
    Thanks
    Arun

    This thread is pretty old, but this can help anyone in the future:
    To handle a drop in InDesign, you have to implement your own custom CDragDropTargetFlavorHelper. You can find a working example in SDK Sample. Take a look at BasicDragDrop.sdk project in the SDK.

  • TS3212 I download Itunes and keep getting the message "Apple Appliation support was not found. Apple application support is rquired to run Itunes. Please uninstall itunes, then install itunes again."  Anyone know what i need to do to get it downloaded?

    I download Itunes and keep getting the message "Apple Appliation support was not found. Apple application support is rquired to run Itunes. Please uninstall itunes, then install itunes again."  Anyone know what i need to do to get it downloaded?

    b noir
    I have a very similar problem.  I am running a new install of Windows 8.1.  When I install iTunes 64 bit I receive 2 similar pop-up error windows containing the following (note error code and error text differ "iTunes Helper" vs. "iTunes"):
    ^^^^^^^^^^^^^^^^^^^^^
    Apple Application Support was not found.
    Apple Application Support is required to run iTunesHelper. Please uninstall iTunes, then install iTunes again.
    Error 2
    ^^^^^^^^^^^^^^^^^^^^^^
    Apple Application Support was not found.
    Apple Application Support is required to run iTunes. Please uninstall iTunes, then install iTunes again.
    Error 2 (Windows error 2)
    ^^^^^^^^^^^^^^^^^^^^^^
    I've followed the instructions given in this post:
      download/install WinRAR
      extract iTunes64Setup
      double click AppleApplicationSupport.msi
    When I run AppleApplicationSupport.msi, I receive the following error:
    ^^^^^^^^^^^^^^^^^^^^^^
    !   C:\Users\Charlie\Downloads\iTunes Extract - 2\iTunes64Setup\AppleApplicationSupport.msi: The archive is corrupt
    ^^^^^^^^^^^^^^^^^^^^^^
    Any ideas?

  • The latest Firefox version won't expand to make text and images more visible on my 32" screen, although I have tried to adjust the advanced Windows appearance settings in the same way that has worked in previous versions of Firefox.

    Normally I have had to go to Control Panel; Appearances and Themes; Display; Settings; Advanced; Custom; and then I adjust the Customize Setting to 155% (149 dpi). I have hit on this setting through trial and error; larger and icons like the cursor get big and fuzzy. Smaller than 155% and text and images are tiny on the 32" wide screen. This time that procedure doesn't seem to work. The text and images remain too small regardless of setting, although the cursor icon gets big. I can manually zoom the pages, but that is clumsy and has to be redone. Does anyone know of an easy setting fix? I am not too smart about this stuff--mostly trial and error, but I do want to be able to enjoy my wide screen. Thanks!

    Normally I have had to go to Control Panel; Appearances and Themes; Display; Settings; Advanced; Custom; and then I adjust the Customize Setting to 155% (149 dpi). I have hit on this setting through trial and error; larger and icons like the cursor get big and fuzzy. Smaller than 155% and text and images are tiny on the 32" wide screen. This time that procedure doesn't seem to work. The text and images remain too small regardless of setting, although the cursor icon gets big. I can manually zoom the pages, but that is clumsy and has to be redone. Does anyone know of an easy setting fix? I am not too smart about this stuff--mostly trial and error, but I do want to be able to enjoy my wide screen. Thanks!

  • When trying to launch iTunes it freezes and I get the message: "Authentication Required. To access this site you need to log in to area "100656 on mellor.co. Your password will be sent in the clear." I am unable to enter a uname or password. Please help!!

    When trying to launch iTunes on my PC running Windows 7 it freezes and I get the message: "Authentication Required. To access this site you need to log in to area "100656 on mellor.co. Your password will be sent in the clear." Because iTunes is frizen at this point I am unable to enter a username or password, or in fact do anything. Please help!! I have uninstalled and reinstalled iTunes numerous times as well as attempting all of the fixes that I could find on-line and still no joy.

    That sounds extremely phishy to me... iTunes does not require authentication simply to launch it. I suspect you've got something nasty intercepting network traffic. That server may be set up to log the Apple ID that you enter so it can be used fraudulently. Try ComboFix from Bleeping Computer.
    FWIW the domain mellor.co is registered to an accountants in Knutsford, Cheshire, UK, and produces the same authentication request if visited with a browser. There is no sign of a "real" publicly visible website at that domain which is a somewhat odd.
    tt2

  • Is there a way to add images , text and button in the individual marquee of a carousel

    Is there a way to add images , text and button in the individual marquee of a carousel ?

    Write a custom carousel.  Usually carousel components are just ULs that use something like jQuery to rotate through the LIs.  The foundation carousel component is really just designed for some specific use cases.  Generally I would just recommend rolling your own.

Maybe you are looking for

  • PI 7.1 and SOA comaptibility

    Hi, Is PI 7.1 Fully compatible with SOA guidelines and principles. or Are there any features/functionality that is only partially or not inline with SOA guidelines and principles. If there are such, can you pls tell me. Thanks, Mani.

  • Visual Difference between acrobat 7 and 8

    Hi All, Facing visual difference between acrobat 7 and 8. Working on MAC. 1. Create pdf using compatability "Acrobat 7 (PDF 1.6). There is no visual differences,  while open the pdf in Acrobat 8 and above (as like as Indesign) 2. But there is a visua

  • OS X Mavericks doesn't read my usb, sd and external hard drive

    Hi all, I am using Macbook pro (Mid 2010) and recently upgraded to OSX 10.9.3. Since switching to Mavericks, I have problems with using USB, SD Card and External hard drive (Freecom Classic II). The outcome is random. Sometimes, I am able to use it f

  • "insufficient privileges" errors when installing iTunes 10.0 (Bonjour)

    I attempted to install iTunes 10.0. Initially I used the auto-installer and I received the following errors: "The installer has insufficient privileges to access this directory: C:\Program Files\Bonjour. The installation cannot continue. Log on as ad

  • Color is not printing

    Color does not print when the color option is selected.  I've replace the cartridges with new HP cartridges.  run the align and clean printheads a couple of times but nothing seems to work.  The best I get is black where appropriate and orange/rust w