Sending HTML file as body of email message

Hello everybody,
I am trying to send a HTML file as body of an email message using JAVA mail API. If anybody has more insides pls let me know......
Waiting for your reply!!!!!!!!!

Here's what our app does:message.setDataHandler(new DataHandler(new ByteArrayDataSource(bodyHTML, "text/html")));where message is a MimeMessage and bodyHTML is a String containing the HTML.

Similar Messages

  • Unable to read main body of email messages on iPhone following iOS7.0

    Since the upgrade to iOS7.0 the main body of email messages no longer appear when I select a message from the Inbox.  I can see sender details, subject and date/time of message but nothing below this.  I have checked the Settings for Mail but there is nothing obvious to me how to correct this.  Any help would be gratefully received.

    Same problem here.  I deleted the accounts and reloaded them.  It was no help.  Anyone have any idea?

  • How to send smartform output in body of email?

    Hi all ,
    I have to send smartform output in body of email (not as an attachement in mail) .PLease help me in this regard.
    Thanks,
    Ananth S.

    Hi Ananth
    See these threads.
    [https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6889194]
    [https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6861330]
    [https://forums.sdn.sap.com/click.jspa?searchID=23497094&messageID=6855364]
    Regards
    Hareesh Menon

  • How to send txt file  as attachement in email

    Hi Experts ,
    How to send  txt file  as attachement in email .
    which function module i use

    Hi,
    Try to use this one
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    Hope it can solve your problem!
    Good luck!
    Tao

  • How to send html file

    I have created an html file that i want to email. I didn't want to email it as an attachment but as the contents of the email(so the recipient opens the email and sees the html file).
    How do I do this?

    hi there,
    I am not familiar with Multiparts.....
    I want to send a html file as a newsletter so it has graphics
    String urlMailContent = "http://java.sun.com/developer/onlineTraining/JavaMail/";
    BodyPart urlPart = new MimeBodyPart();
    URL urlToAdd = new URL(urlMailContent);
    URLDataSource dsURL = new URLDataSource(urlToAdd);
    DataSourceurlPart.setDataHandler(new DataHandler(dsURL));with the above code example, what do i set the content to?
    My code is below(I can see how my code doesn't work as the BufferedReader doesn't read graphics), can u help me fix it. My problem is that the graphics ar enot coming through.
                StringBuffer body = new StringBuffer();
                BufferedReader br = new BufferedReader(new FileReader("C:\\Documents and Settings\\Ushantam\\My Documents\\My Office\\Autopax Passenger Services\\IT News Letter\\ITLetter220704.html"));
                String line = br.readLine();
                while (line!=null){
                    body.append(line);
                    line=br.readLine();
                Properties props = System.getProperties();
                props.put("mail.host", host);
                Session session = Session.getDefaultInstance(props, null);
                MimeMessage message = new MimeMessage(session);
                message.setSubject("Test Letter");
                message.setFrom(new InternetAddress(from));
                message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
                message.setContent(body.toString(), "text/html");
                Transport.send(message);any help will be appreciated

  • Sending web pages as body of email.

    Hi everyone,
    So, I know how to open webpage and go to FILE> Mail contents of this page. But for some reason when I do this and email someone and they try to forward this on to another person everything becomes all jumbled up in the body of the message. I have tested this by sending myself and email both on my MAC and PC and it does this with my MAIL app too. Does anyone know why this is so difficult to do?
    I heard that the new MAIL in leopard was going to be able to do this better. I just want to send out email brochures to my client mailing list but I want them to be able to forward them on as well.
    Thanks,

    Instead of trying to send the contents of the webpage, simply send a nice note to your contacts in this email and insert the web address.
    Like:"Come visit my new webpage and forward this note to your friends...".
    THEN, paste the URL of your page into the email (http://www.MyNewExamplePage.com)
    or whatever your website address is.
    Formatting an email as true HTML can be a little hard, since (as you've found) since different email programs, ie: your recipients, display HTML email differently.
    Plus, as THEY forward your mail, it's THEIR email program which changes the formatting...you have lost control of the formatting as soon as you click send.
    Send out the URL. And poke around here for more tips for success.
    http://www.google.com/search?hl=en&q=sendingHTML+email&btnG=GoogleSearch

  • How to send HTML mail with images multipart/related message

    Hi,
    Could any body tell me how to send HTML mail with images in "multipart/related" message,if any body can give the code ,it would be helpful.
    Thanks

    Hi,
    Could any body tell me how to send HTML mail with
    ith images in "multipart/related" message,if any body
    can give the code ,it would be helpful.
    ThanksHi!
    Refer to
    http://developer.java.sun.com/developer/onlineTraining/JavaMail/index.html
    I've found it very helpful.
    Look at the last part for a code showing how to send HTML mail!
    Regards

  • How to send zip file as attachment through email

    Hi All,
    I am having a requirement that I need to download the internal table data into .txt file and I need to zip the text file. And this zip files needs to send to the customer through email.
    I am able download the data into .txt and able to zip the file. But I am not able send the .zip file through email.
    I know that we can send .xls, .txt, .csv and also .ppt, .doc file types we can send as an attachement through abap program. But I don't know about .zip files. Is there any possibilty to send .zip file as an attachment thorugh email.
    Can any one help me how to send a .zip file thorugh email as an attachment. 
    Regards,
    vinod

    hi Vinod,
    Can you please tell me how you have zipped the file.
    I am having a text file in application server. I need to zip that file. Then the middleware moves it to Legacy system.
    I used the following code. With this I am having the data in Binary format which my midleware cannot understand.
    What I need on the whole is just to reduce the size of the file.
    form ZIP_FILE .
    DATA: lt_data TYPE TABLE OF x255,
          lt_textdata TYPE TABLE OF x255.
    DATA: ls_data LIKE LINE OF lt_data.
    DATA: lv_dsn1(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEX.TXT'.
    DATA: lv_dsn3(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEXZIP.zip'.
    *DATA: lv_dsn3(100) VALUE '/interfaces/SM5/test.zip'. " Contains sample1.xls and sample2.xls
    DATA: lv_file_length TYPE i.
    DATA: lv_content TYPE xstring.
    DATA: lo_zip TYPE REF TO cl_abap_zip.
    CREATE OBJECT lo_zip.
    Read the data as a string
    clear lv_content .
    OPEN DATASET lv_dsn1 FOR INPUT IN BINARY MODE.
    READ DATASET lv_dsn1 INTO lv_content .
    CLOSE DATASET lv_dsn1.
    lo_zip->add( name = 'sample.TXT' content = lv_content ).
    lv_content = lo_zip->save( ).
    *clear lv_content .
    Conver the xstring content to binary
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = lv_content
    IMPORTING
    output_length = lv_file_length
    TABLES
    binary_tab = lt_data.
    OPEN DATASET lv_dsn3 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT lt_textdata INTO ls_data.
    TRANSFER ls_data TO lv_dsn3.
    ENDLOOP.
    CLOSE DATASET lv_dsn3.
    IF sy-subrc EQ '0'.
        MESSAGE s999(zfi_ap_gl) WITH text-t10.
      ENDIF.
    Can you please help.
    Thanks Aravind

  • Sending HTML content in body for emailnotification in OSB

    hi,
    i have done an emailnotification service in OSB..
    currently HTML content in body is not supported in OSB..
    how to send the html content as body for an email..
    please provide a solution at the earlist..
    thanks

    how to send the html content as body for an emailSimply as you send a XML. Post OSB related queries in SOA suite forum -
    SOA Suite
    Regards,
    Anuj

  • Send Attachment Files Of MM03 via email

    Dear Experts,
    I have requirement of send Attachment files of MM03 transaction Via Email.
    Example.
    Go to TCODE MM03.
    Select Views:  Basic Data1 and Basic Data 2.
    Click on GOS (Generic Object Services) where you find Attachment List.
    I want to send that PDF files Via Email.
    Please tell me how I can read that file and send via Email as attachment.
    Thank you

    Hi
    1. Readout the GOS  FM: BDS_GOS_CONNECTIONS_GET  > make list of Attachments...
    2. Read the object:    FM: SO_OBJECT_READ 
    3. Download it into a Temp directory:   FM: SO_OBJECT_DOWNLOAD
    4. Upload into itab:    cl_gui_frontend_services=>gui_upload
    5. Put Table with text into Email.. & send... FM: SO_NEW_DOCUMENT_ATT_SEND_API1
    6. delete Temp file
    that was my way....
    Robert

  • How can I send a file of photos by email?

    I have a file of .jpeg and .mov photos and movies. How can I send the file to someone else via email or the next best possible thing?
    Thank you
    Roy

    zip up the folder  control click(right click on the folder)>Compress
    Send the zip file.
    http://appleinsider.com/articles/14/10/17/how-to-use-mail-drop-and-markup-to-sen d-large-emails-in-os-x-yosemite

  • Burst in HTML format as body of email

    Is this possible?
    I have a very small report that I want to burst to email, but I want the email body to contain the HTML report. (In theory, so it can be read on mobile devices).
    When I set attachment to false, the emails are blank.

    Not certain if you're using EBS but if you do,.. bursting email body can be html formatted like the control file excerpt below...
    <xapi:message id="${TRX_NUMBER}" to="$[email protected]" cc="" bcc=""
              attachment="true" content-type="text/html" subject="TEST ${TRX_NUMBER}">
              <![CDATA[
           <html>
           <body>
           <p>Dear Customer,<br/><br/></p>
           <p>This is a test message.<br/><br/></p>
           <p>This is another test message.<br/><br/></p>
           <p>Thank you again.<br/><br/></p>
           <p>IT Dept<br/></p>
           </body>
              </html>]]>
             </xapi:message>regards,..

  • Send web page as body of email

    I would like to send a web page as the body of an email in my java web app... any thoughts on how to accomplish this? Thanks.

    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public boolean sendMail(String host, String toAddress,
                String fromAdress, String subject)
    try
        String content =   "<html><head><title>hello</title></head>"+
              "<body>Hello</body></html>";
        String mimeType="text/html";
        Properties props = new Properties();
        props.put("mail.smtp.host", host);
        Session session = Session.getInstance(props, null);
        Message message = new MimeMessage(session);
        message.setFrom(new InternetAddress(fromAdress));
        InternetAddress to[] = new InternetAddress[1];
        to[0] = new InternetAddress(toAddress);
        message.setRecipients(Message.RecipientType.TO, to);
        message.setSubject(subject);
        message.setContent(content, mimeType);
        Transport.send(message);
    } catch (Exception e)
        return false;
        return true;
    }

  • In Adobe froms - Sending PDF file as Attachment  via email

    I have to develop a <b>PDF form</b> and one more requirement; I have to change the mail Content (body) and the Subject line which should have attached PDF file.The (Transaction Code VA21) Has the sending the Email part. My  Requirement is to <b>Change the Content (body) and the Subject</b>. 
    Requirement;
    When customer request for the quote, quote document is created in SAP (Transaction Code VA21). Promised Price, quantity, date is communicated to customer via quote output. Customer may decide to place firm order with reference to quote.
    So this form (PDF file and send via email) is used to communicate the AMAT quote to customer. The PDF file will be as a attachment in the mail. With change subject line, and content of the mail (Thanks for the Quote, Please don’t reply to this mail). It also consists of applicable terms & condition of the quote.
    Is it possible to handle the Content and the Subject of the mail in Program or Form layout (SFP). or it's Enhancement?
    How to go about it? I tried a lot. At last am contacting you. Please.............. Let me know. Very urgent.Point will be given sooon. Tnx a lot.....
    #Sinivas

    Hi,
    Yes But you can use ADOBE FORMS for that... Check this link for presentation...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0c139d3-3eae-2910-01a1-d253f2587b0e?prtmode=navigate
    Check this BLOG for sending Email through ABAP..
    Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface
    One more thing... You can download your data to a PDF file and send that PDF file via program...
    Search this Forum for more answers.. you would get plenty out of it...
    Check this thread for further information..
    Sending mail with 2 attachments
    Hope this would help you.
    Any queries plz revert back
    Good luck
    Narin

  • PDF file as code in email message

    Hi,
    I received an email with a PDF file attached. This file I can open on a Windows pc or via webmail perfectly, but in Mail the attachment is part of the message (in code):
    <---start message--->
    "Dear ...,
    Hereby you receive the pdf file...
    %PDF-1.4 %Çåôå› 2 0 obj << /Filter /FlateDecode /Length 851 >> stream xÚå˘_o€6 ÀƒÍOq/ V ˆIJ¤h }Hk']˜&«§,ÀÖa`dÆœ'≈⁄D9ë>‡H{fl“ ÉâÁˇ"  %ñx (et cetera)"
    <---end message--->
    Does anyone know what is causing this? And how can I read/extract the attachment? Thanx in advance!

    Hi,
    I received an email with a PDF file attached. This file I can open on a Windows pc or via webmail perfectly, but in Mail the attachment is part of the message (in code):
    <---start message--->
    "Dear ...,
    Hereby you receive the pdf file...
    %PDF-1.4 %Çåôå› 2 0 obj << /Filter /FlateDecode /Length 851 >> stream xÚå˘_o€6 ÀƒÍOq/ V ˆIJ¤h }Hk']˜&«§,ÀÖa`dÆœ'≈⁄D9ë>‡H{fl“ ÉâÁˇ"  %ñx (et cetera)"
    <---end message--->
    Does anyone know what is causing this? And how can I read/extract the attachment? Thanx in advance!

Maybe you are looking for

  • Brightness control keys stop working after booting MacOSX

    I bought a new iMac 27" a couple of weeks ago, and I installed Windows 7 using bootcamp. All the control keys (brightness, volume, etc) works ok on Windows until I reboot it in MacOSX. When i start windows again, brightness controls keys stops workin

  • Attempting to copy to the disk failed. Unknown error occurred (-69)

    My Ipod won't perform an automatic update of my songs. I changed the settings to manual and it will only update certain songs in my library. Please help!

  • HT5570 Verification e-mail???

    When I send my verification of apple id to email it never arrives. I've made absolutely certain it is the right address and sent verification email many many times. Nothing shows up in my inbox. Nothing! What do I do now?

  • Can anyone help with database driven design

    Hi, I would like to determine the best way to serve large amounts of text on an html page. I have manuals with lots of links that I want to add to a website. I would like to employ database driven web development in my design, would this be a good us

  • How to find out the exact BAdI

    hi all, can any one tell me how to find out the exact badi for the given transaction