You’ve got Mail…from ResultsManager?

How are you ever going to keep your inbox empty if GyroQ keeps putting an updated plain text outline of your ResultsManager “Daily Action” dashboard in it every morning?

That problem aside, web-based email is now nearly universally accessible from home and work, and increasingly by mobile phone. Always having an updated next-actions list nearby without having to remember to regenerate it and export/print/send might be handy. The solution below takes “Next Actions to Go” even farther. As ti turns out, we just need to make use of a short snippet of macro code to send email from within MindManager. Here’s how to do it:

  1. Generate a daily action dashboard and save it as “My Maps\dashboards\dailyactions.mmap”. Ideally set up your computer to regenerate it regularly using the “Put it in front of the door” script.
  2. Paste the packed text from the new “mna” tag from the GyroQ tag library into GyroQ.
  3. Edit the “mna” code replacing name@domain.com with your email address and smtp.isp.com with your ISP’s outgoing SMTP server.
  4. Run the mna tag. This will save a plain text outline of your next-action list as c:\nextactions.txt and then the bmail utility will mail it to you.

You've Got Mail

Once you have this working OK, the next step is to take this GyroQ code and place it at the end of your scheduled “Put it in front of the door” script to have the email sent automatically.

There is now a full example overnight script in the tag library.

I have to say it is a nice change of pace to just look at a plain text lits of things to do by context rather than a MindManager map, and to finally have my “actions by context” at hand(held), even when I wasn’t disciplined enough to do the dashboard regeneration and printing.

You might expand the approach above to include daily-action dashboards hard-coded with the names of your familiy members or colleagues (put their name in for %me%) and send them their own lists.

Give it a try and let us know how it goes. As usual the ActivityOwner.Com quality control department has gone home early for the day :-).

30 Comments »

  1. ActivityOwner said,

    March 7, 2007 @ 9:44 pm

    Note the post above and its associated code has been simplified from the original version. Now instead of using a stand alone utility to email a saved text file, it just sends the next-actions list directly from within the macro.

    Only trick is to edit in your email address and ISP smtp server and make sure you have your dailyaction dashboard saved in a dashboard directory under you my maps directory. You need to “edit”,”references” in the macro editor and check off ms data objects 2.8

    Good luck!

  2. Cynthia said,

    April 10, 2007 @ 5:08 pm

    I really want to get this to work, but keep getting runtime error. Could I clarify in the comment of March 4th at 9:44 pm – should I actually be deleting the text “Microsoft ActiveX Data Objects 2.8” from the code? Is that exactly what to delete or is there anything else to change from the orginal post?

    Thanks!

  3. ActivityOwner said,

    April 10, 2007 @ 6:33 pm

    Hi Cynthia — Sorry you are having trouble. What error message are you getting?

    I updated the tag library with the “overnight” script I currently use:
    http://www.activityowner.com/scripts/overnight_script_code.php

    It orginally had the macro code embedded inside it with “macro:run:’Rem… ‘

    I now have it running a stand-alone macro:
    macro:run:’ao\ao_send_branch.mmbas’

    The ao_send_branch.mmbas file is located in the macro library:
    http://www.activityowner.com/macros/ao_send_branch.mmbas

    The overnight script assumes you will save it in a “my maps\ao\” directory.

    You just need to replace the smtp server and email address with your own. The file should take care of adding the reference to ms data objects 2.8.

    The problem may have been that the reference wasn’t getting added correctly with the macro embedded in the gyroactivator “overnight” script.

    Hope this helps. It is a very useful script to run to keep you on track and using RM routinely.

  4. Cynthia said,

    April 10, 2007 @ 9:53 pm

    I really appreciate your help. I’ve put in the “overnight” script, and the automatic dashboard production is working great, but still no e-mail produced.

    I have my smtp server and e-mail address, but after the new dashboard is produced, the error I’m getting is “An error occured while trying to access the macro GyroActivator-macro.MMBas Please check that the macro is valid”

  5. ActivityOwner said,

    April 10, 2007 @ 10:09 pm

    OK — that helps — I think we’ll be able to get to the bottom of it.

    When GyroQ/GyroActivator uses the run:macro:’line of code’ command, what it is doing is taking the code snippet and putting it into a file called gyroactivator-macro.mmbas in your “my maps” directory and running it from there.

    The error you are getting is saying there is an error in the “line of code” snippet. To find out what is wrong, open the gyroactivator-macro.mmbas file from the macro editor (tools, options, macro, macro editor). You’ll need to browse to your “my maps” directory to find it.

    With the macro open, hit the green “play” triangle button. It should advance the macro to the line with the error and give you a more specific error message.

    Let me know what you find. I apologize in advance if is due to some mistake in what I’ve uploaded.

  6. Cynthia said,

    April 10, 2007 @ 10:58 pm

    OK-

    Looks like the error is in this lind:

    %%200ASet objMessage = CreateObject(“CDO.Message”)

    based on the other code, I thought maybe it should be:

    Set objMessage = CreateObject(“CDO.Message”)

    I tried that change, and it doesn’t show that line as an error any more, but once I save and close and run again, when I open up the macro in the macro editor the error is there again….thanks again

  7. ActivityOwner said,

    April 10, 2007 @ 11:15 pm

    Did it give you a more specific error message when run from within the macro editor?

    The %0D%0A escape code a trick to insert line feeds and enable multi-line macros to work from within gyroQ rather than having to run a separate file. Double quote characters also have to be escaped as %22.

    The area of the code around the set object should have the %22 for the previous line’s closing ” and then a %0D%0A for the cr/lf and then the set obj…

  8. Cynthia said,

    April 10, 2007 @ 11:42 pm

    No specific error message.

    Sorry if this is somehow all user error, but I’d love to get to the bottom of this, because I think it would be a great tool to have. The code for the macro is below. I tried changing the set object to:

    “%22OD%0ASet objMessage = CreateObject(“CDO.Message”)

    from what is below, but still no go:

    ‘ Created by GyroActivator 1.4 04/10/2007
    Sub Main()
    Rem#Reference {2A75196C-D9EB-4129-B803-931327F72D5C}#2.8#0#C:\Program Files\Common Files\System\ado\msado15.dll#Microsoft ActiveX Data Objects 2.8 Library
    smtp=”SMTP.gmail.COM”
    email=”>@gmail.COM”
    schema=”http://schemas.microsoft.com/cdo/configuration/”
    %%200ASet objMessage = CreateObject(“CDO.Message”)
    With objmessage
    .Subject = “NextActions:”&Date
    .From = email
    .To = email
    .TextBody = Clipboard
    End With
    With objMessage.Configuration.Fields
    .Item(schema&”sendusing”) = 2
    .Item(schema&”smtpserver”) = smtp
    .Item(schema&”smtpserverport”) = 25
    .Update
    End With
    objMessage.send
    End Sub

  9. Cynthia said,

    April 10, 2007 @ 11:44 pm

    sorry…the email address name came out as “>” in fact, my e-mail address name is there.

  10. ActivityOwner said,

    April 11, 2007 @ 12:02 am

    You are very patient with this. It looks like something is going wrong with the escape characters. There shouldn’t be the %%200A in front of the set obj… line.

    How are you running the script overall? Are you using the mna tag or the “overnight” script? If you are using the mna tag, you might want to reinstall the packed text from the library. Gyronix has been tweaking how they handle and store the escape codes in version 1.9.3 and that can trigger the need to reinstall macro-containing tags if you have upgraded.

    If reinstalling doesn’t work, can you email the script to me (info at activityowner.com) so I can have a look at it.

  11. ActivityOwner said,

    April 11, 2007 @ 8:01 am

    HI Cynthia — I looked at the text file you sent me offline. The problem is that it has an actual hard return in the middle of the escape characters. The embedded macro lines need to be one continuous line with the escape characters taking care of the cr/lf.

    The text below

    …onfiguration/%22%0D%
    0ASet objMessage…

    needs to instead look like

    …onfiguration/%22%0D%0ASet objMessage…

    The next problem you may run into is getting this to work using gmail’s smtp server. I would recommend instead using the one from the isp you are using (e.g. something like smtp.comcast.net).

    Good luck

  12. Cynthia said,

    April 11, 2007 @ 10:07 am

    Hooray! Thanks so much for your help.

    Cynthia

  13. ActivityOwner said,

    April 11, 2007 @ 8:32 pm

    So did it finally work for you or is this just an optimistic anticipation?

  14. Cynthia said,

    April 12, 2007 @ 1:32 am

    Yes! Sorry I should have been more specific :) The Hooray! was because it is working- beautifully.

    You were right about gmail, but I just set up a specific mailbox with my isp to forward to gmail, which is better anyway because now I can filter those e-mails and have them sent to my team.

    Next step: have to figure out if it’s possible to use the Next Actions by Project by Person dashboard instead of my daily actions, since I want to send to several people. Or alternatively, I have to find a way to have MindManager automatically switch who “I” am to send each team member their individual list – all ideas welcome :) Thanks again.

  15. ActivityOwner said,

    April 12, 2007 @ 8:03 am

    Great — just so you know, in my experience you can use whatever to/from address you like in the script, but you need to use the smtp server of your own ISP. The thought is that if you did something bad, they could track you down and shut off your account. On the other hand, gmail doesn’t know for sure that you are you unless you provide a password.

    There are several ways to accomplish your next step. The send branch script in the library will send whatever “branch” of a map you select in the script leading into it. You could use that to iterate through branches of a dashboard (perhaps even build in email addresses into the dashboard.

    There isn’t a way to switch “me” in RM through code. What you need to do is search/replace the dashboard you want, replacing %me% with the name of each person and then save dedicated (and retitled) copies for each person to be executed separately. If you are dealing with a small and fixed group, that is probably the fastest way to move ahead if you are not comfortable with getting into the code a bit.

  16. Walter said,

    October 27, 2007 @ 2:37 pm

    Hi AO,

    I like the Mail Next Actions tag, but I can’t really use it becuase I don’t use the GTD method of NA. What I would like to do is make Mail Next Actions send me the Deadlines.

    Any suggests on what code needs to be changed replaced? I replaced “NextActions” with “Deadline” in the mna code, but the tag is still looking for the NAs.

    Suggestions?

  17. ActivityOwner said,

    October 28, 2007 @ 5:37 am

    Hi Walter — In order to do what you want, just change the GyroQ code from

    select:main;select:text:’My committed Next Actions towards success’;

    to:

    select:main;select:text:’Deadlines I%27ll accomplish’;

    The %27 is ascii code for the quote in I’ll that would otherwise confuse GyroQ.

    If you don’t want to edit the long string of code that sends the text, you download the “ao_send_branch.mmbas” code from the wiki to “My Maps\AO” and then use code below. It will prompt you for your “from:email address”, “to: email address”, and the outgoing smtp server of your internet sever provider upon 1st use and then store these in a map for future use.

    {map:open:’dashboards\dailyactions’;
    select:main;
    select:text:’Deadlines I%27ll accomplish’;
    detail:6;
    run:macro:’AO\ao_send_branch.mmbas’;
    }

  18. Walter said,

    October 28, 2007 @ 1:28 pm

    Hi AO, okay thank you for the fix, it got the tag to run a bit farther before I got the following error message:

    The sequence {run:D:SharedDocs/My Mind Maps\GyroQ\GyroQ-CommandBuffer.txt} returned an error:

    Message from MindManager 7:
    A runtime error occurred while executing the macro D:\SharedDocs\My Mind Maps\GyroActivator-macro.MMBas

    I’m open to suggestions, since I’m now officially outside my zone of competence.

  19. ActivityOwner said,

    October 28, 2007 @ 2:25 pm

    OK — The fastest way to find the problem is to open the GyroActivator-macro.mmbas file listed in the error message by clicking on tools, macros, macro editor and then “file, open”, and then hitting the play button to run it.

    This file is a temporary macro file created by GyroQ to execute the macro code

    Running the macro from within the macro editor will give a more descriptive error message. It is probably just a dumb mistake on my part.

  20. Walter said,

    October 29, 2007 @ 3:10 pm

    Alright, got the same error message at the application level. Here’s the error message from the macro editor:
    “Server rejected one or more recipients. The server response was: 550 must be authenticated”.

    Let me know what this tells you. At the layman’s level, looks like I’m hosed if I can’t turn off server authentication.

  21. ActivityOwner said,

    October 29, 2007 @ 6:38 pm

    OK — I made some modifications to ao_send_branch.mmbas that enables to support authentication. Download the revised mmbas file to your “My Maps\AO” directory:

    http://wiki.activityowner.com/images/b/b0/Ao_send_branch.mmbas

    I was able to get it to work with gmail using these settings:
    http://mail.google.com/support/bin/answer.py?hl=en&answer=13287

    When you first use it it will prompt your for the port to use, your username (for gmail it is username@gmail.com), and your password. Your password is stored in clear text in the My Maps\AO\emailconfg.mmap file, so keep that in mind from a security point of view.

  22. Walter said,

    October 31, 2007 @ 1:55 pm

    Still no joy. The map (cool, btw) asks for the STMP, the outgoing email address and the incoming email address. Nothing about which port to use, username or password.

    I’m open to suggestions.

  23. ActivityOwner said,

    October 31, 2007 @ 3:49 pm

    Try deleting the emailconfig map so that the program has to rebuild it. Its not smart enough to add new parameters to an existing map.

  24. Walter said,

    November 3, 2007 @ 12:25 pm

    No, that doesn’t change about the information the map asks for, just runs through the process again. Btw, is this supposed to work with web-based email only?

  25. ActivityOwner said,

    November 3, 2007 @ 2:09 pm

    Whoops — Looks like I hadn’t synced up the latest version to the wiki. Try download again:

    http://wiki.activityowner.com/images/b/b0/Ao_send_branch.mmbas

    Sorry about that.

  26. Chuck Brown said,

    April 2, 2008 @ 2:09 pm

    Updated the ao_send_branch.mmbas file, then tried the mna tag. Got nothing. Just for the heck of it, I checked, and there was not emailconfig map. So, on a wild guess, I renamed the ao_send_branch.mmbas, and reran mna. No error, no reaction. So, mna isn’t even trying to call ao_send_branch. Can you suggest what I might have wrong?

    Thanks!

  27. ActivityOwner said,

    April 2, 2008 @ 7:59 pm

    Hi Chuck — The “mna” version of this script on the wik has all the code embedded in it. It doesn’t rely on the macro or the configuration map. In order to get it to work you would need to update the text in the tag with your email address and isp mail server.

    I just updated the tag with a a version that makes use of the ao_send_branch_by_subtopic.mmbas and
    aos_send_branch.mmbas

    macros.

    I haven’t tested this combination recently so let me know how it works for you.

  28. Chuck Brown said,

    April 11, 2008 @ 9:30 am

    I downloaded the latest ao_send_branch.mmbas and ao_send_branch_by_subtopic.mmbas, and put them in the\ao directory. I downloaded the latest mna tag, and loaded it. I updated the email info in the ao_send_branch, and ran mna. I got an error saying macro file not found… \send_branch_by_subtopic.mmbas.

    Questions:
    1. the file downloaded from the library is named ao_send_branch_by_subtopic, yet we’re looking for \send_branch_by_subtopic. Is this a naming/coding error on the site, or do I have something setup wrong (obviously, I can just rename the file, but wasn’t sure if there was a mismatch for some other reason).
    2. Your last post said that the latest mna verson of the code ‘has all the code embedded in it… doesn’t rely on the macro’, yet it also says you updated the tag that makes use of the macro’s. I’m confused. Is it optional whether the tag works with the macro or not now? When I look at the code for the tag, I see where to update smtp and email address, but there doesn’t seem to be a place for authentication information.

  29. ActivityOwner said,

    April 12, 2008 @ 10:47 am

    Hi Chuck — Sorry about the confusion. The problem here is that there are several tag/script/macro/hybrid ways to accomplish this that have evolved over time and I haven’t kept all the variations up to date. I just updated the mna tag to call ao_send_branch_by_topic instead of send_branch_bysubtopic.

    The ao_send_branch.mmbas file has the code that builds the configuration map on first use, including authentication info.

    I

  30. Chuck Brown said,

    April 14, 2008 @ 9:22 am

    I’m not sure from the post… does this mean that send_branch_bysubtopic is no longer needed? I deleted it, but got an error when ao_send_branch_by_topic tried to call it. So, I downloaded again and got another error. This is easy to fix, but should probably be corrected on the site… the file downloads as “ao_send_branch_by_subtopic”, but is called as “send_branch_by_subtopic”.

    When I rename it, and run it, I get a dialog box titled Sax Basic, that shows my smtp address, an ok/cancel button, and a series of confirmation dialog boxes. For someone who hasn’t read the wiki, it would probably be useful to put information in the box as to what’s being asked (i.e. it lists out whatever information I’ve updated the .mmbas with, but doesn’t say that I’m replacing/confirming/whatever my email from/email to/etc).

    I’m not sure if this is intended behavior or not; I realize (now!) that this macro is no longer intended to be edited with the email info, but is intended to ‘self-configure’. However, I had edited it in advance. When the prompts ran, they presented me with the values I had edited into it, so I just clicked “ok”, assuming they were correct. What I didn’t realize is that if you don’t specifically enter a value in, no value is stored in the map; OK alone isn’t good enough. Again – may be by design, may be an oversight… just thought I’d mention it!

    Thanks!

RSS feed for comments on this post · TrackBack URI

Leave a Comment

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.