How to Email a remote html file as an attachment

Hi ,
I want to mail an html file as an attachment using JAVAMail. I have only the URL of the remote file.How can i do this? Please show me a way.......

I basically want to send a multipart object as an attachment using java mail.My multipart object contains a remote html file contents and related gifs. I want to send the whole object as attachement so that the user can save it locally and view the html and embedded gifs.this is what i did
MimeMultipart multipart = new MimeMultipart("related");
messageBody.setContent(totContent,"text/html");//totContent is the html file contents.
multipart.addBodyPart(messageBody);
//loop to embed the gifs
messageBody.setDataHandler(new DataHandler(new URL(imagepath)));
messageBody.setHeader("Content-ID", imgName);
multipart.addBodyPart(messageBody);     
//loop ends
i want this multipart to be send as an attachment. Please enlighten me.......this is a bit urgent........

Similar Messages

  • How do i send an html file exported from muse as email blast with images and live links?

    My question it:
    How do i send an html file exported from muse as email blast with images and live links?
    I have designed a "website" in adobe muse and exported it as an html file. I am not sure how to send my .html file in an email!
    Best,
    Nicole

    Unfortunately, the answer is, you don't. The requirements for HTML displayed in an e-mail reader are very different than those for HTML displayed in a browser. The output of Muse won't work as an HTML e-mail. You could upload the Muse site as a website and provide a link to it in an e-mail, but the HTML generated by Muse is not suitable for direct display by an e-mail program.

  • How to get source of remote html file.

    i want to read the remote html file source
    i don't have any physical / original path of the file
    i have only the url path
    example url : http://mydomain.com/myhomepage.html
    using this url can i get the source of the file myhomepage.html
    thanx
    senthil.

    U can use java.io.*, java.net.* API
    here goes a sample code
    import java.io.*;
    import java.net.*;
    public class URLconnecting{
         public static void main(String[] args)throws Exception{
              URL url = new URL("http://www.yahoo.com");
              URLConnection conn = url.openConnection();
              BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
              String line;
              while( (line= reader.readLine()) != null) System.out.println(line);
              reader.close();

  • How do I Open an HTML file for iOS?

    How do I open an HTML file for iOS using acrobat?

    This is a forum for Adobe Reader for iOS. Acrobat doesn't run on iOS. You need to run it on a Mac or Windows computer. In Acrobat, you can choose File > Create > PDF from Web Page to do what you want. You cannot do that in iOS.

  • How to read a text/html file in java regardless of its encoding?

    Hi All,
    How to read a text/html file in java regardless of its encoding?
    1. Is there any way to identify that a file (read using FileInputStream/or any other means with java.io package) has been saved with which type of encoding i.e. whether the file is using ANSI encoding or Unicode encoding or other?
    2. Is there any standard way to read an encoded file (i.e. files having UTF-16 format for Asian locales character support) and un-encoded file (i.e. files having ordinary ANSI format) correctly without knowing the user input?
    The problem is that while creating an instance of 'InputStreamReader' (ISR) we can pass the encoding type used (otherwise it takes the system's default encoding type), and the ISR expects the file to be in the same encoding format otherwise it reads it as some junk. But we don't know which file the user is going to pass whether it is Unicode (for Asian locales file should be in Unicode) with or ANSI coded (for non-Asian / English locales user generally uses ANSI encoding).
    Regards,
    Sam

    1. There is no reliable way of guessing the encoding of a file without that information. Thats why XML for example has very strict rules wrt. it's encoding (short form: use UTF-8 or UTF-16, if you use anything else, you'll have to specify it)
    2. you might be able to make an educated guess if the possible range of encodings is limited, but it will probably never be 100% certain
    3. The HTML file might have a header entry "<meta http-equiv..." that tells you about it's encoding. You could try to read the start of the file and see if you find that, then if you found it re-read the entire file.
    regards

  • How to load external storage html file in web view

    hi all,
        how to load external storage html file in web view, please help me
       " ms-appdata://local/index.html" not working
    veerasuthan veerakesan

    It need be read as string. Then load the string by  Webview.NavigateToString.
    Sample as below
    string htmlstring = string.Empty;
    try
    var htmlfile = await Windows.Storage.ApplicationData.Current.LocalFolder.OpenStreamForReadAsync("a.html");
    using (System.IO.StreamReader streamReader = new System.IO.StreamReader(htmlfile))
    htmlstring = streamReader.ReadToEnd();
    webview.NavigateToString(htmlstring);
    catch(Exception ex)
    Debug.WriteLine(ex.ToString());
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

  • How may load an external (html) file in swf? Anyone!!!!!

    hi all,
        How may load an external html file in swf? such as google.com in a movieclip.
    anyone may help me.........????????

    With Flash, you can't do this.
    Just with FlashBuilder and Air (something like HTMLLoader  , not sure now)
    I mean loading in a movieclip..
    Of course you can open a page to display in a browser.

  • How to make a remote panel file dialog open remote directory from any computer

    Hello to everybody. I am using Labview 6.1 and I would like to know how to make a remote panel file dialog open remote directory from any computer (Not only from a specific computer. If I open the file with a specific computer, I have to conect the path of the remote machine, but if I don´t know which remote computer is going to run the aplication, how can I do it?)?

    Hi!
    first you have to know progammatically the name of the remote pc connected to your server: this is a problem!
    I did not find a straigth way, LV 6.1 doesn't allow much progammatic control on the remote panel connection feature, but I'm confident that in the next LV version this will be improved!
    The point is that the Remote Panel Connection Manager (from the Tools menu) has all the informations about the connection: client name, server vi and whatever.
    This application is embedded in the \PROJECT\REMOTEPANEL.LLB and consists of a set of password protected vis.
    So here's the trick: use VIServer to grab data from the rpcm Get Server Data.vi when the Remote Panel Connection Manager is in run mode. By this you get all the informations (not only client name)o
    f the remote panel connection. See my example.
    By the way use client machine name to build the file dialog function input path.
    If anybody has an alternative method it would be more than appreciated to share it.
    Good luck,
    Alberto Locatelli
    Attachments:
    get_remote_machine_data.vi ‏151 KB

  • How to recover missing index.html files

    How to recover required index.html files in Pages?

    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=308&mforum=iworktips ntrick
    Peter

  • Adf11g how to open pdf or html files from  webservice

    hi all,
    adf11g how to open pdf or html files from webservice .

    Hi,
    This is standard functionality, that you can read more about in the OLM User Manual. You can upload the files to an OLM content server or to any other content server that can be accessed with a URL.
    Regards Anders Northeved

  • How do I save all mp3 files as an attachable file in text messaging on a G'z One Commando? Some mp3 save as these types of files but I don't how or what I do differently.

    How do I save all mp3 files as an attachable audio file in text messaging on a G'z One Commando? Some mp3 save as these types of files but I don't how or what I do differently.

    In summary, it sounds to me as though the Mac concept of "hidden extension per file" isn't embraced at all by Photoshop.
    So assuming the extension is always visible, what is the easiest way do each of the following (ignoring issues with integration with other apps):
    1.  Save a JPEG as:  abc.jpg
    2.  Save a JPEG as:  abc
    3.  Save a JPEG as:  abc.
    4.  Save a JPEG as:  abc.xxx
    Since it seems to me we still haven't nailed down whether there's a disparity between how this works on Photoshop for Mac vs. PC, I'll answer the above questions for PC:
    1.  File - Save As, choose Format: JPEG, type (replace filename with):  abc
    2.  No difference than 3 on a PC.
    3.  File - Save As, choose Format: JPEG, type:  abc.
    4.  File - Save As, choose Format: JPEG, type:  abc.xxx
    How is it different from the above on a Mac?
    Is there something more complex, such as the sequence of operations, or another system setting, that I didn't cover here?  I normally always keep Explorer set so that file extensions are visible (it's global on a PC).
    -Noel

  • How to load an exteranl html file in a div

    All-
    Im sure this has been covered but I can't find what I'm looking for.
    How do I load content from an external html file into a div in Edge?
    I want my client to have the option of updating the html files so i don't have to edit them in edge
    The files are inside of a folder called "content"and the index.html file is outside of this folder.
    Thanks

    I tried this and it works. Thanks.
    How can I control the EA timeline with the loaded HTML? I would like to animate the "webPageDisplayPort" div on stage when a user click a button or image inside the loaded HTML.
    HTML code:
    <div class="image" onClick="comp.play();"></div>

  • How to create a small HTML-file in Applet

    What i wan't to do is as follows:
    1. In an applet i create a string containing a small HTML-file. Its contents depends on what the user chose in the applet.
    2. then i wan't to redirect the browser to that HTML-file. appletcontext.showDocument(URL) could be used.
    The problem is how can i create an URL to a string which is only in memory.
    Writing the string to a file and then creating URL to it poses problems, as we all know, writing files from applets is difficult.
    Any help would be appreciated.

    Here is how you do it:
    1) use the JSObject (you may have to import
    netscape.javascript.JSObject depending on the
    version of your SDK) to open a window with an empty
    URL, a title , and a _blank or _self
    target.
    2) use the JSObject document.write to write the HTML
    string to the window that you opened in #1 above
    3) close the document.
    If you need further assistance, post your code and I
    can modify it for you or if you want, I can whip up a
    small demo applet for you to try.
    ;o)
    V.V.Thanks!! Your post has been very helpful. One question though, I suppose the client has to have a java-plug-in installed in his/her web-browser, is that right?

  • How do i change the HTML file names for existing index

    Hi,
    How do i change my existing HTML file names for indexes. The Html file name is disabled when we click on properties.
    Ex:   Index Keywork : Architecture
            Old HTML Page/URL =: Architecture.htm
    I want to change  Old HTML Page/URL =: Architecture.htm to architecture_new.htm
    Please find the screenshot attached.

    That's because you are looking at the Properties and that is not how you create index entries.
    Highlight the Index keyword ("Paste" in this example). It shows below what is already linked. If you delete that, the keyword will be displayed in bold to show no keyword is attached. You can add further keywords by dragging them from the Topic List.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How do I activate an HTML file from the tools menu?

    I understand how to add a custom entry to the TestStand 4.0 Sequence editor using the TOOLS->CUSTOMIZE... menu selection, but I want to:
    1) Activate an HTML page when the TOOLS menu option is selected
    and
    2) Provide the directory of the current sequence file to the HTML
    and
    3) Disable this new menu selection if the current sequence file has not been saved.

    Thanks for the clarification of your suggestion.  I have created a sequence with a single step: "Call Executable".  In the Executable Pathname field I have specified iexplorer.exe.  When I specify a specific HTML page in the Argument Expression field (i.e., "D:\Test.html") the sequence runs fine and properly activates IE showing the specified HTML file.  If I just specify a directory in the Argument Expression field (i.e., "D:\Foo\Bar") the sequence runs fine and properly activates IE showing the specified directory.
    However, when I put RunState.InitialSelection.SelectedFile.Path into the Argument Expression field, it doesn't show the directory.  Do I have to do something special in order to get RunState.InitialSelection.SelectedFile.Path properly interpreted when the sequence is executed?

Maybe you are looking for