Using sub-directories in an email

Hi
I want to attach an HTML file to an email using JavaMail. The HTML file contains links to image files that are stored in a sub directory (img).
I am having problems representing the sub-directory structure in an Email created using JavaMail.
Any help would be gratefully received.

Think about how the e-mail will look to the person reading it. There will be some links, of course. And how should those links look? They should look like something that somebody could use from anywhere on the Internet. So obviously "C:\data\wombat.gif" isn't going to work. Your best bet is for the link to look something like "http://www.animallovers.org/wombat.gif", and that means you need a web server that can serve out those files.

Similar Messages

  • How do we refer Sub directories using UTL_FILE command

    Hi Gurus,
    I have created a DIRECTORY My_project using CREATE DIRECTORY COMMAND. This directory is linked to my OS D:\My_project folder.
    There are several sub directories under My_project folder such as D:\My_project\Outfile folder which I would like to refer while using UTL_FILE command to process files.
    When I try to run the following PLSQL
    DECLARE
    out_file utl_file.file_type;
    l_line VARCHAR2(100);
    BEGIN
    out_file :=UTL_FILE.FOPEN('My_project\Outfile','abc.txt','w');
    l_line := 'HELLO TESTING';
    utl_file.put_line(out_file,l_line);
    UTL_FILE.FCLOSE(out_file);
    EXCEPTION
    WHEN no_data_found then
    UTL_FILE.FCLOSE(out_file);
    when others then
    raise_application_error(-20912, 'Others ' ||sqlerrm);
    END;
    I get
    ORA-29280: invalid directory path
    error.
    As there are many directories involved under My_project folder and there will be new directories created in the future as well, so I was wondering if there is a way to read files from any sub directory of My_project directory
    Please advise. Thanks for all your help.

    Hi Anto!
    Try it like this:
    out_file :=UTL_FILE.FOPEN('My_project','Outfile\abc.txt','w');I hope this helps!
    your sincerely
    Florian W.

  • List all files in a directory, not including the sub directories if any

    Hi,
    I have been looking around php.net for a bit and can not work
    out how i list the files that are in a directory i.e.
    www.site.com/directory/
    I would like the names of each file to be placed in an array,
    but not to have the sub directories in this list should there be
    any.
    I was given some code a while ago that done this but it
    listed the sub directories and i would like them not in this list.
    I do not have this code anymore and do not know where i got
    it, so i can not get it amended to what i need.
    please can someone tell me what line of code i should be
    using.
    thank you in advance for your help.

    (_seb_) wrote:
    > not very clever wrote:
    >> Hi,
    >>
    >> I have been looking around php.net for a bit and can
    not work out how
    >> i list the files that are in a directory i.e.
    >>
    >> www.site.com/directory/
    >>
    >> I would like the names of each file to be placed in
    an array, but not
    >> to have the sub directories in this list should
    there be any.
    >>
    >> I was given some code a while ago that done this but
    it listed the
    >> sub directories and i would like them not in this
    list.
    >>
    >> I do not have this code anymore and do not know
    where i got it, so i
    >> can not get it amended to what i need.
    >>
    >> please can someone tell me what line of code i
    should be using.
    >>
    >> thank you in advance for your help.
    >>
    >>
    >>
    >
    > The follwoing PHP code will do just that. Just replace
    "pathToFolder"
    > with the path to your folder.
    > I made the list of files also link to each file. Just
    remove the link
    > echo if you don't them to be links.
    >
    > <?php
    > // FUNCTION TO LIST FILES:
    > function listFiles($path){
    > if($handle = opendir($path)){
    > while(false !== ($file = readdir($handle))){
    > if (is_file($path.'/'.$file) &&
    !preg_match('/^\./',$file)){
    > $files_array[]=$file;
    > }
    > }
    > }
    > return($files_array);
    > }
    > $path = 'pathToFolder';
    >
    > // CALL THE FUNCTION:
    > $files_array = listFiles($path);
    > foreach($files_array as $file){
    > echo '<p><a
    href="'.$path.'/'.$file.'">'.$file,'</a></p>';
    > }
    >
    > ?>
    >
    I spotted one error:
    foreach($files_array as $file){
    echo '<p><a
    href="'.$path.'/'.$file.'">'.$file,'</a></p>';
    should be:
    foreach($files_array as $file){
    echo '<p><a
    href="'.$path.'/'.$file.'">'.$file.'</a></p>';
    (a dot after $file, not a coma)
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

  • How to use sub folder paths for external table location parameter?

    is it possible to use one Oracle directory and address multiple files under some OS sub-directories beside that Oracle directory? Like;
    host mkdir /tmp/orcl_dir
    host mkdir /tmp/orcl_dir/fold1
    host mkdir /tmp/orcl_dir/fold2
    CREATE DIRECTORY ext_tab_dir AS '/tmp/orcl_dir';
    CREATE TABLE ext_all_source
        ORGANIZATION EXTERNAL (
           TYPE ORACLE_DATAPUMP
           DEFAULT DIRECTORY ext_tab_dir
           LOCATION ( 'fold1/all_source1.dmp', 'fold2/all_source2.dmp' ) ) PARALLEL 4
        AS SELECT * FROM all_source;
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04076: file name cannot contain a path specification: fold1/all_source1.dmp
    ORA-06512: at "SYS.ORACLE_DATAPUMP", line 19Thank you.
    Message was edited by:
    antu

    Justin is there a way you are aware of at operating system level to teach oracle that it has to access for example 16 different piece of files over a meta file. I saw some definition file like this but I am searching if this is the tools own mapping format;
    $ cat ./CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat
    (object mfile_c_type
    (path "file:OBSOLETE")
    (fs "file://amanos/s01/abinitio/data/prod/mfs/mfs_16way")
    (local_paths 16
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_001/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_002/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_003/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_004/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_005/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_006/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_007/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_008/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_009/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_010/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_011/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_012/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_013/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_014/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_015/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"
      "file://amanos/s01/abinitio/data/prod/mfs/parts/mfs_16way_016/mfs_16way/Applications/RDS/CON_PUB/main/CON_xfrm_subs_status_reason_act_lk_20080302.dat"))or at least a symbolic linking strategy may handle this, but I couldn't figure out how and of course this will have its own costs of course to manage.

  • Index.html pages in local sub-directories will not load automatically when sub-directory name entered into address field, followed by a forward-slash

    I am in the process of designing a website-on-a-CD. In order to make things easier for my clients, I decided to organize this site into local sub-directories with an index.html page in each one. However, when I try to enter the local sub-directory name, followed by a forward-slash, the index page does not open automatically. Instead, I get a raw directory listing that includes the index.html file, and anything else that is present within it. I would like to know if there is any way to force this page to load automatically within Firefox from a local storage medium as it would load from a web-server.

    You need to use file:// as the protocol instead of C:/. The latter may never work (C:\ might).
    Where is the main HTML located ?
    Easiest if to store the images in a sub folder of the location because you can't go back via ../ beyond that root location for security reasons.
    See:
    *http://kb.mozillazine.org/Links_to_local_pages_do_not_work

  • How to correct SpryAssets/SpryMenuBar paths in template for sub-directories?

    I recently converted my real estate web site to CSS using Dreamweaver CS4. I use a primary template for most of my pages, which have both a horizontal and a vertical spry menu bar. When I create a page with the template and save it in a sub-directory (not at root level), after a page view,  I get errors on the server such as:
    File does not exist: /home/I_DELETED_THIS/public_html/homes_for_sale/SpryAssets, referer: http://locatehome.com/homes_for_sale/10-2264.htm
    (I replaced part of the URL with "I_DELETED_THIS" since this is posted publicly)
    The SpryAssets directory is at the root level of my site. The template includes the code further below at the bottom of the source code in a non-editable area of the template, which I think is the source of the problem, especially since I get two error messages for each page view and the SpryAssets directory is referenced twice in the following code after the last div. Part of the code is commented out:
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    Can I delete this code from the template or will my menu bars not function if they have sub-menus?
    The template changes the file path for other CSS scripts in the head of the template and links, etc. in the body, but not for this section of code. Is there a way to modify my template so that the path files will be correct when a create new pages in sub-directories?
    I saw one suggestion in the Forum to another user with a related problem that he should manually change the code in this section of the template to have a file path relative to the root, but it seems that the program should automatically be taking care of things like that.
    Many thanks,
    Dave K.

    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var
    MenuBar2 = new Spry.Widget.MenuBar("MenuBar2",
    {imgDown:"SpryAssets/SpryMenuBarDownHover.gif",
    imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    No you cannot delete the menu constructors, they are the ones that call the menus. The comment tags are purely for browsers that do not have JavaScript enabled.
    As far as template behaviours are concerned, I am afraid that this is not a very helpful forum. You will need to go to the Dreamweaver Forum for that http://forums.adobe.com/community/dreamweaver/dreamweaver_general
    I hope this helps.
    Ben

  • Loop through sub-directories

    Hi,
    I want to loop through the sub-directories of one given folder. How to correct the following problems?
    dir = args[0];
    try
    string [] dirlvl2Ent = Directory.GetDirectories(dir);
    for (string dirlvl2 in dirlvl2Ent)
    Error 1 ; expected F:\App8\Program.cs 50 37 ProcessSWFile
    Error 2 ; expected F:\App8\Program.cs 50 40 ProcessSWFile
    Error 3 Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement F:\App8\Program.cs 50 40 ProcessSWFile
    Many Thanks & Best Regards, Hua Min

    for should be foreach.
    string [] dirlvl2Ent = Directory.GetDirectories(dir);
    foreach(string dirlvl2 in dirlvl2Ent)
    jdweng

  • Include all sub-directories and files?

    I did search, so don't complain that this has been asked a billion times.
    I am using Automator to replace text for files and folders. But this only works with the files and or folders I select, it doesn't do it with the sub-directories and sub-files. How can I config. Automator to do this?
    Thanks.

    The various actions operate on whatever is input to them. If you are referring to the *Rename Finder Items* action, you can use the *Get Folder Contents* action to go into sub folders, but be careful, since this action will go into bundles/packages such as applications and RTFD files.

  • Sub-directories / albums

    Is it possible to create sub-directories of albums in iPhoto 4? Looks like you can create Folders in iPhoto 5 which then contain separate albums, but can you do something similar in iPhoto 4? Basically I want to group all photos from a holiday in Egypt ('master' album/folder called 'Egypt') and the subdivide this into separate albums called e.g. Cairo, Giza, Red Sea etc.) - or is this one of the enancements in iPhoto 5 which couldn't be acieved in earlier versions?
    Neil

    Neil,
    If you have lots of photos have you thought of multiple library folders to speed things up.
    These two apps make it a snap to create multiples and switch between them:
    For using multiple library folders:
    buddy/ manager
    http://nofences.net/iphotoBuddy/
    http://homepage.mac.com/bwebster/iphotolibrarymanager.html

  • Sub-directories in the PDBooks

    Hi,
    I use the distribution list to edit some of my reports and place them in a designated folder.
    When I create a new distribution list, I save it in the PDBooks section by doing this : ePublish > Manage distribution list > Save under. Here we have the possibility to create sub-directories in the PDBooks section. That's what I did.
    We also have the possibility to save the distribution list in the PDBooks section of my team.
    However, when we edit the distribution list (ePublish > Offline Distribution Wizard and then Lockdown and Save to folder), we only have access to the distribution lists saved in the company PDbooks directory (not the directory of my team and not the sub-directories).
    Do you have a solution to classify my distribution list according to the users?
    Thanks
    Christelle

    Hello Joris,
    I am an administrator on BPC and I check that I am a teamleader in my team. Moreover, I have access to publisk books.
    Indeed, I can publish distribution list, but only when they are saved in the company PDBooks.
    Do you have another idea?
    thanks.
    Regards,
    Christelle

  • Jad in sub directories

    Hello all,
    How can i use JAD to de-compile all the class files in java files in a
    directory and also in its sub-directories in a single statement instead of
    going to each directory and decompile.
    Thank You.
    KK

    Nope... DW wants to find all of its templates in one place.
    Can't you just name the file admin.dwt and keep it in the default
    folder? Then tell your admins that's the one to use?

  • Sub directories foto's

    I use the IPOD Video, and want to try to get all my foto's on the IPOD. This is not a problem. I give the name of the directorie where the foto's are, and all the foto's are on the IPOD. But I have one probleem. My First level directory, named Holiday have al lot of subdirectory's under it. Example Hollyday Jamaica, Holliday Europe, etc. Whats happen: When I open foto's, Holidays than I see all the pictures, and not the posibilty to open the sub-directories. How can I do this. Please let me know. Thanks

    Ik weet niet over Photo Organizer. Voor mijn gebruik, ik meestal bijsnijdenen vergroten of verkleinen. Ik gebruik "PS Express ". Ik heb ookPhotoPad, ColorSplash, Photobucket en ArtStudio.
    Niet zeker wat is zoals iPhoto, heb ik niet een gevonden. Hopelijk werkt Apple aan een, zoals ze vrijgegeven voor iMovie op de iPhone en iPad 2.
    Ik gebruik translate.google.com te vertalen naar het Nederlands. Ik hoop dat het juist is.

  • Sub folder vanished with emails. Emails still can be found with search option but won't display text

    A bunch of my subfolders for sorting my email vanished, which was brought to my attention when TB tried to sort my mail and said that the subfolder did not exist. I re-created the subfolders with the same name as before and when I went into the new subfolder I was surprised to see that all the past email were in it. However, when I opened the e-mails the body of the emails were empty. (I even tried highlighting for white text as suggested on line, but nothing)
    I used the "search emails "options to try and find them, using the title of the emails as the search parameter ie "Receipt for your PalPay payments" and the search results provided me with the results of all the missing emails with the full text of each e-mail. However, when I went into individual emails (or the open emails as list option) the text was still not there. It must be there somewhere since the search option is finding it.
    I tried deleting the Profile (global-messages-db.sqlite) hoping that it would bring the text back but it didn't work. Most of the emails that are blank are of the financial nature and I would really like them back.
    HELP!!!!!
    Thank You, John Jaeger

    in he middle of the search results screen at the top is a show list option. (
    hidden in plain sight) click it. in the list. right click the headings and select location. That will not find you mail as such. but it will give the folder the search is finding it in. If that name is what you expect, you have perhaps dragged the folder or folders to another location so they are a sub folder of another unrelated folder.
    View Menu (Alt+V) > folders > all to ensure only real physical folders are visible, now you will need to expand each and every folder in the tree to locate your folders.

  • How I search only sub directories in my bookmarks?

    If I do search Firefox searches through all my bookmarks. I only want it to search in the current directory and/or sub directories.
    I do not want to use tags. I just want to search for the name.

    Is there any add-ons that I can use to make searching my bookmarks useful. It is now getting beyond frustrating. I can not believe this program doesn't have a useful way to search.

  • Calling forms from sub-directories

    Greetings,
    I have 19 different apps that are on a Solaris Application server in separate directories. I do have the FORMS_PATH set to the "root" but I was wondering if it is possible to call forms in one of the sub-directories without having to add that sub-directory to the FORMS_PATH.
    So far have tried CALL_FORM('ats/ats_ro_2') and CALL_FORM('/ats/ats_ro_2')
    Regards,
    Bill Chadbourne

    It may be possible, but i would not recommend to do so. What happens if you at some point decide to restructure your applicarion? You would have to adjust all your calls.
    if you really want to go that way and you have only one path in your FORMS_PATH, you could read the FORMS_PATH using TOOLENV.GETVAR and then use the full qualified path to call your forms.

Maybe you are looking for

  • At least one amount is required in document rows

    Hi all I have written some code for JE transfer from a set of databases to one database with all valid accounts, customers etc existing in all. for a particular credit memo's JE, it gives me "At least one amount is required in document rows " error.

  • The iMQ 2.0 restart command isn't doing what I want.

    I have installed the imq 2.0 on solaris 8 on a single host. jmq broker is installed by following the admin guide. When I tried to use jmqcmd shutdown bkr. It is shutdown without any problem. Then I use jmqcmd restart bkr to restart the jmqcmd It come

  • Can't use special character "ç" in airport password

    Hi, I'm trying to connect to a wireless network, whose password contains the character "ç". For some reason airport won't let me input that character, but all others are fine. I've tried edit => insert special character, I've tried to copy / paste bu

  • Reading from Array

    Hi all, I have a piece of code a need a little help with. I created a method that is supposed to read an array and look for a .,?, or !, which denotes that this is the end of the sentence. I am trying to invoke the method to print out whether or not

  • Reg : Master Item creation

    Hi all, I m setting up the new instance.(R 12.1.1 ) ..In that i am facing following problem 1) While creating Inventory Org --> In Org parameters ---> Calender field is Disabled (Calender is created and build) 2)While creating Master Items --> Invent