Email - receipts

Discussion in 'Rebol' started by geoff, Apr 14, 2010.

  1. geoff

    geoff New Member

    Is it possible to configure send to request email receipts? I've not seen it documented or any examples.


  2. Graham

    Graham Developer Staff Member

    Not that I've ever seen. Presumably it's a custom header so if you can find the documentation, we could construct a custom header to use with send.
  3. MaxV

    MaxV Member

    Just use


    because you have to add "Disposition-Notification-To:" header, example:

    boundary_str: "xxxxxxxxx"
    myheader: make object! [
    Content-Type: "text/html; charset=ISO-8859-15"
    X-REBOL: "View http://WWW.REBOL.COM"
    Subject: "Example"
    Date: reform [now/date now/time]
    MIME-Version: "1.0"
    Content-Type: rejoin [ "multipart/related; boundary=^"" boundary_str "^"" ]
    mytext: "Hello word!"
    send/header mytext myheader

    That's all! You can use also HTML and attache image with MIME and the boundary string!!! :rolleyes:
  4. geoff

    geoff New Member

    Thanks MaxV
  5. MaxV

    MaxV Member

    You are wellcome. However I noticed that many ANTI-SPAM softwares want a "well formatted date", so to obtain the correct format date I suggest:
    thedate: ""
    if now/weekday = 1 [ append thedate "Mon, "]
    if now/weekday = 2 [ append thedate "Tue, "]
    if now/weekday = 3 [ append thedate "Wed, "]
    if now/weekday = 4 [ append thedate "Thu, "]
    if now/weekday = 5 [ append thedate "Fri, "]
    if now/weekday = 6 [ append thedate "Sat, "]
    if now/weekday = 7 [ append thedate "Sun, "]
    append thedate reform [parse (to-string now/date ) "-"]
    append thedate " "
    append thedate now/time
    append thedate " "
    tzone: (to-integer now/zone) / 3600
    either (sign? tzone) = 1 [ append thedate "+"] [ append  thedate "-"]
    if tzone < 10 [ append thedate "0"]
    append thedate tzone
    append thedate "00"
    Have a nice day!
  6. Graham

    Graham Developer Staff Member

    Hi MaxV

    You can get the days and months from locale

    >> probe system/locale
    make object! [
        months: [
            "January" "February" "March" "April" "May" "June"
            "July" "August" "September" "October" "November" "December"
        days: [
            "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday"

Share This Page