mailto with current date

Discussion in 'HTML' started by Matthew Bedford, Oct 16, 2003.

  1. Is there a tag or script(s) which will enable me to create an email
    message with the subject containing the current date. I know about the
    &subject etc... I just want to know how to set up the current date
    inside that subject along with some other text
     
    Matthew Bedford, Oct 16, 2003
    #1
    1. Advertising

  2. Matthew Bedford

    Kris Guest

    In article <Jjzjb.75$>,
    Matthew Bedford <> wrote:

    > Is there a tag or script(s) which will enable me to create an email
    > message with the subject containing the current date. I know about the
    > &subject etc... I just want to know how to set up the current date
    > inside that subject along with some other text


    For all that and more, us e a server side form handler, which will
    process the form and send the results to any desired e-mail address and
    send appropriate content back to the browser.

    Your host may already have pre-made scripts for you available that may
    meet your needs.

    Don't trust methods of information gatherng that rely on the client side.

    --
    Kris
    erlands (nl)
    "We called him Tortoise because he taught us" said the Mock Turtle.
     
    Kris, Oct 16, 2003
    #2
    1. Advertising

  3. Well, actually I am looking to create a shorcut, script, or program on
    my desktop that will open up or create an email so I can enter a daily
    report. The thing is I forget to update the date, and there is certain
    standard fare that I enter every time. I've saved an email on the
    desktop right now, but I still have to update the date.... I'm not
    working on the web with this one...

    Kris wrote:

    > In article <Jjzjb.75$>,
    > Matthew Bedford <> wrote:
    >
    >
    >>Is there a tag or script(s) which will enable me to create an email
    >>message with the subject containing the current date. I know about the
    >>&subject etc... I just want to know how to set up the current date
    >>inside that subject along with some other text

    >
    >
    > For all that and more, us e a server side form handler, which will
    > process the form and send the results to any desired e-mail address and
    > send appropriate content back to the browser.
    >
    > Your host may already have pre-made scripts for you available that may
    > meet your needs.
    >
    > Don't trust methods of information gatherng that rely on the client side.
    >
     
    Matthew Bedford, Oct 16, 2003
    #3
  4. Matthew Bedford

    Kris Guest

    In article <r8Ajb.94$>,
    Matthew Bedford <> wrote:

    [top posting fixed]

    > Kris wrote:
    >
    > > In article <Jjzjb.75$>,
    > > Matthew Bedford <> wrote:
    > >
    > >
    > >>Is there a tag or script(s) which will enable me to create an email
    > >>message with the subject containing the current date. I know about the
    > >>&subject etc... I just want to know how to set up the current date
    > >>inside that subject along with some other text


    > > Don't trust methods of information gatherng that rely on the client side.


    > Well, actually I am looking to create a shorcut, script, or program on
    > my desktop that will open up or create an email so I can enter a daily
    > report. The thing is I forget to update the date, and there is certain
    > standard fare that I enter every time. I've saved an email on the
    > desktop right now, but I still have to update the date.... I'm not
    > working on the web with this one...


    That is not related to HTML or the Internet in general, highly off-topic
    in this group and something I have no knowledge of. If you own a Mac,
    look into Applescript.

    Consider a more polite way of replying. Bottomposting, instead of
    topposting, for instance.

    --
    Kris
    erlands (nl)
    "We called him Tortoise because he taught us" said the Mock Turtle.
     
    Kris, Oct 16, 2003
    #4
  5. Matthew Bedford

    Richard Guest

    Kris wrote:

    > In article <r8Ajb.94$>,
    > Matthew Bedford <> wrote:


    > [top posting fixed]


    >> Kris wrote:


    >> > In article <Jjzjb.75$>,
    >> > Matthew Bedford <> wrote:
    >> >
    >> >
    >> >>Is there a tag or script(s) which will enable me to create an email
    >> >>message with the subject containing the current date. I know about

    >> the
    >> >>&subject etc... I just want to know how to set up the current date
    >> >>inside that subject along with some other text


    >> > Don't trust methods of information gatherng that rely on the client

    >> side.


    >> Well, actually I am looking to create a shorcut, script, or program on
    >> my desktop that will open up or create an email so I can enter a daily
    >> report. The thing is I forget to update the date, and there is certain
    >> standard fare that I enter every time. I've saved an email on the
    >> desktop right now, but I still have to update the date.... I'm not
    >> working on the web with this one...


    > That is not related to HTML or the Internet in general, highly
    > off-topic
    > in this group and something I have no knowledge of. If you own a Mac,
    > look into Applescript.


    > Consider a more polite way of replying. Bottomposting, instead of
    > topposting, for instance.


    True it is not related directly to website html, however, the group name
    does not reflect strict rules to only website material.
    As you know, html can be used on a local machine just as it can be applied
    to any website.
    therefor, his post IS on topic.
    Naturally, scripting of any type which can be implemented within html, is
    also relative.

    <flame retardant suit on>
     
    Richard, Oct 16, 2003
    #5
  6. Kris wrote:
    > In article <r8Ajb.94$>,
    > Matthew Bedford <> wrote:
    >
    > [top posting fixed]
    >
    >
    >>Kris wrote:
    >>
    >>
    >>>In article <Jjzjb.75$>,
    >>> Matthew Bedford <> wrote:
    >>>
    >>>
    >>>
    >>>>Is there a tag or script(s) which will enable me to create an email
    >>>>message with the subject containing the current date. I know about the
    >>>>&subject etc... I just want to know how to set up the current date
    >>>>inside that subject along with some other text

    >
    >
    >>>Don't trust methods of information gatherng that rely on the client side.

    >
    >
    >>Well, actually I am looking to create a shorcut, script, or program on
    >>my desktop that will open up or create an email so I can enter a daily
    >>report. The thing is I forget to update the date, and there is certain
    >>standard fare that I enter every time. I've saved an email on the
    >>desktop right now, but I still have to update the date.... I'm not
    >>working on the web with this one...

    >
    >
    > That is not related to HTML or the Internet in general, highly off-topic
    > in this group and something I have no knowledge of. If you own a Mac,
    > look into Applescript.
    >
    > Consider a more polite way of replying. Bottomposting, instead of
    > topposting, for instance.
    >

    My apologies on the top/bottomposting, kinda new to the newsgroup thing...

    and if there is anybody who knows of some HTML code which could pull up
    current system date, I would really appreciate some assistance.

    ~MattB
    nuthin'much
     
    Matthew Bedford, Oct 16, 2003
    #6
  7. Matthew Bedford

    Kris Guest

    In article <>, "Richard" <anom@anom>
    wrote:

    > > That is not related to HTML or the Internet in general, highly
    > > off-topic
    > > in this group and something I have no knowledge of. If you own a Mac,
    > > look into Applescript.


    > True it is not related directly to website html, however, the group name
    > does not reflect strict rules to only website material.
    > As you know, html can be used on a local machine just as it can be applied
    > to any website.
    > therefor, his post IS on topic.


    It is not about HTML.

    > Naturally, scripting of any type which can be implemented within html, is
    > also relative.


    Slowly I am starting to understand what he was actually asking. It may
    also be a matter of me not reading carefully.

    > <flame retardant suit on>


    I only like to read flamatory posts. I rest my case.

    --
    Kris
    erlands (nl)
    "We called him Tortoise because he taught us" said the Mock Turtle.
     
    Kris, Oct 16, 2003
    #7
  8. While the city slept, Matthew Bedford <> feverishly
    typed:

    > Kris wrote:
    >> In article <r8Ajb.94$>,
    >> Matthew Bedford <> wrote:
    >>
    >> [top posting fixed]
    >>
    >>
    >>> Kris wrote:
    >>>
    >>>
    >>>> In article <Jjzjb.75$>,
    >>>> Matthew Bedford <> wrote:
    >>>>
    >>>>
    >>>>
    >>>>> Is there a tag or script(s) which will enable me to create an
    >>>>> email message with the subject containing the current date. I
    >>>>> know about the &subject etc... I just want to know how to set up
    >>>>> the current date inside that subject along with some other text

    >>
    >>
    >>>> Don't trust methods of information gatherng that rely on the
    >>>> client side.

    >>
    >>
    >>> Well, actually I am looking to create a shorcut, script, or program
    >>> on my desktop that will open up or create an email so I can enter a
    >>> daily report. The thing is I forget to update the date, and there
    >>> is certain standard fare that I enter every time. I've saved an
    >>> email on the desktop right now, but I still have to update the
    >>> date.... I'm not working on the web with this one...

    >>
    >>
    >> That is not related to HTML or the Internet in general, highly
    >> off-topic in this group and something I have no knowledge of. If you
    >> own a Mac, look into Applescript.
    >>
    >> Consider a more polite way of replying. Bottomposting, instead of
    >> topposting, for instance.
    >>

    > My apologies on the top/bottomposting, kinda new to the newsgroup
    > thing...
    >
    > and if there is anybody who knows of some HTML code which could pull
    > up current system date, I would really appreciate some assistance.



    >
    > ~MattB
    > nuthin'much


    --
    Nigel Moss.

    Email address is not valid. . Take the dog out!
    http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
    In the land of the blind, the one-eyed man is very, very busy!
     
    nice.guy.nige, Oct 17, 2003
    #8
  9. While the city slept, Matthew Bedford <> feverishly
    typed:

    > My apologies on the top/bottomposting, kinda new to the newsgroup
    > thing...


    If only all new people were so polite! Have a read of the following for more
    info;

    How To Post in Newsgroups:
    http://allmyfaqs.com/faq.pl?How_to_post

    > and if there is anybody who knows of some HTML code which could pull
    > up current system date, I would really appreciate some assistance.


    Well... as long as you promise to only use this on your own computer at home
    and never, ever use it on the net, the following should work. Stick it in
    the body of an HTML document and feel free to tinker with it...

    <script type="text/javascript">
    today = new Date();

    document.write("<p><a
    href=\"mailto:?subject="+today.getDate()+":"+today.
    getMonth()+":"+(today.getYear()+1900)+"%20Report\">Email Report</a></p>");
    </script>

    .... but read the following for Very Good Reasons why you should not normally
    do such things on the net;

    How Can I Add a Subject or CC to a Mailto Link?
    http://www.vortex-webdesign.com/help/faq.htm#mailtosubject

    The Mythical Mailto
    http://www.isolani.co.uk/newbie/mailto.html

    Hope that helps,
    Nige

    --
    Nigel Moss.

    Email address is not valid. . Take the dog out!
    http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
    In the land of the blind, the one-eyed man is very, very busy!
     
    nice.guy.nige, Oct 17, 2003
    #9
  10. nice.guy.nige wrote:
    > While the city slept, Matthew Bedford <> feverishly
    > typed:
    >
    >
    >>My apologies on the top/bottomposting, kinda new to the newsgroup
    >>thing...

    >
    >
    > If only all new people were so polite! Have a read of the following for more
    > info;
    >
    > How To Post in Newsgroups:
    > http://allmyfaqs.com/faq.pl?How_to_post
    >
    >
    >>and if there is anybody who knows of some HTML code which could pull
    >>up current system date, I would really appreciate some assistance.

    >
    >
    > Well... as long as you promise to only use this on your own computer at home
    > and never, ever use it on the net, the following should work. Stick it in
    > the body of an HTML document and feel free to tinker with it...
    >
    > <script type="text/javascript">
    > today = new Date();
    >
    > document.write("<p><a
    > href=\"mailto:?subject="+today.getDate()+":"+today.
    > getMonth()+":"+(today.getYear()+1900)+"%20Report\">Email Report</a></p>");
    > </script>
    >
    > ... but read the following for Very Good Reasons why you should not normally
    > do such things on the net;
    >
    > How Can I Add a Subject or CC to a Mailto Link?
    > http://www.vortex-webdesign.com/help/faq.htm#mailtosubject
    >
    > The Mythical Mailto
    > http://www.isolani.co.uk/newbie/mailto.html
    >
    > Hope that helps,
    > Nige
    >

    thanks, and you have no idea how much tongue biting and rewriting it
    took to respond with that 'polite' answer, thank you

    ~MattB
    nuthin'much
     
    Matthew Bedford, Oct 17, 2003
    #10
  11. nice.guy.nige wrote:

    > document.write("<p><a
    > href=\"mailto:?subject="+today.getDate()+":"+today.
    > getMonth()+":"+(today.getYear()+1900)+"%20Report\">Email Report</a></p>");
    > </script>


    1) The above isn't "HTML code" (as requested), but JavaScript code. The
    proper answer to the original question, asking if there is HTML code to
    insert the current date, is "No, there isn't; HTML is a markup language,
    not a programming language, and has no facility to insert dates."

    2) To be valid when inserted into an HTML document, the above JavaScript
    snippet needs backslashes before the slashes of closing tags
    (<\/a><\/p>), to prevent them from terminating the CDATA section of the
    SCRIPT element.

    3) The getYear() function returns inconsistent results across different
    browser versions (sometimes year-1900, sometimes a four-digit year), so
    your code will result in it outputting years like 3903 in some cases.
    getFullYear() always returns a four digit year, but doesn't work on some
    older browsers. A conditional statement testing the value of getYear()
    is the only universally correct way of inserting the current year in
    consistent format.

    --
    == Dan ==
    Dan's Mail Format Site: http://mailformat.dan.info/
    Dan's Web Tips: http://webtips.dan.info/
    Dan's Domain Site: http://domains.dan.info/
     
    Daniel R. Tobias, Oct 18, 2003
    #11
  12. While the city slept, Daniel R. Tobias <> feverishly typed:

    > nice.guy.nige wrote:
    >
    >> document.write("<p><a
    >>

    href=\"mailto:?subject="+today.getDate()+":"+today.
    >> getMonth()+":"+(today.getYear()+1900)+"%20Report\">Email
    >> Report</a></p>"); </script>

    >
    > 1) The above isn't "HTML code" (as requested), but JavaScript code.


    I actually itended to point out that HTML wouldn't do it but the following
    javascript would...

    > 2) To be valid when inserted into an HTML document, the above
    > JavaScript snippet needs backslashes before the slashes of closing
    > tags (<\/a><\/p>), to prevent them from terminating the CDATA section
    > of the SCRIPT element.
    >
    > 3) The getYear() function returns inconsistent results across
    > different browser versions (sometimes year-1900, sometimes a
    > four-digit year), so your code will result in it outputting years
    > like 3903 in some cases. getFullYear() always returns a four digit
    > year, but doesn't work on some older browsers. A conditional
    > statement testing the value of getYear() is the only universally
    > correct way of inserting the current year in consistent format.


    Marvelous. Thank you for clarifying that. Such a shame you couldn't use your
    knowledge in actually helping the OP.

    Cheers,
    Nige

    --
    Nigel Moss.

    Email address is not valid. . Take the dog out!
    http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
    In the land of the blind, the one-eyed man is very, very busy!
     
    nice.guy.nige, Oct 18, 2003
    #12
  13. Daniel R. Tobias wrote:

    > 1) The above isn't "HTML code" (as requested), but JavaScript code. The
    > proper answer to the original question, asking if there is HTML code to
    > insert the current date, is "No, there isn't; HTML is a markup language,
    > not a programming language, and has no facility to insert dates."


    Well, technically you could make your own DTD with a &currentdate; entity,
    with the URL of the DTD actually being a path to a CGI script, that
    updates the definition of the entity &currentdate; every day.

    Not that *any* browsers would actually handle it.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 18, 2003
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James P.
    Replies:
    7
    Views:
    12,520
    phamtasmic
    Jul 13, 2004
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,275
    Michael Borgwardt
    May 30, 2004
  3. moonhk
    Replies:
    5
    Views:
    544
    moonhk
    Oct 11, 2006
  4. Michael Haas

    compare date field to current date

    Michael Haas, Feb 15, 2004, in forum: ASP General
    Replies:
    4
    Views:
    286
    Mike Haas
    Feb 15, 2004
  5. Thomas Gagne
    Replies:
    2
    Views:
    325
    Robert Klemme
    Mar 15, 2013
Loading...

Share This Page