hmm, actually i do not really understand this syntax:
timer.setTimeout(10000L, [] () {});
in the official simple timer docs for timer.setTimeout it is only this:
int setTimeout(long d, timer_callback f)
Call function f once after d milliseconds. The callback function must be declared as void f(). After f has been called, the interval is deleted, therefore the value timerId is no longer valid.
when you try to set up something like that in google, you will see. it is quite inconvenient, to add an email address to the forwarding list, the person with the new address has to send back a confirmation password to you, than you have to set up new filter for forwarding, etc.
if you later want to add a new person, or remove someone, you have to again meddle with the settings.
for me it seems much cleaner to remove / add a person by simply removing / adding a line of code…
also, if in the future i have to implement something like that in one of my clients project, than i have no other solution just code, because most clients are not capable to set up souch forwarding in google or other mail.
We have this in our plans, as well as some rework of notification (notifs, mail, twitter) widgets, but I have no ideas of the time when it will be done.
ok, right now i’m reading the msdn lambda article, it perfectly makes sense now! this was the explanation i was looking for!
now i remember that back in the old days i’ve used such lambda functions in python too. but that was a long time ago, and python syntax is quite different than c++
RFC 2822 section 3.4 in fact describes how multiples should be defined:
When it is desirable to treat several mailboxes as a single unit
(i.e., in a distribution list), the group construct can be used. The
group construct allows the sender to indicate a named group of
recipients. This is done by giving a display name for the group,
followed by a colon, followed by a comma separated list of any number
of mailboxes (including zero and one), and ending with a semicolon.
Because the list of mailboxes can be empty, using the group construct
is also a simple way to communicate to recipients that the message
was sent to one or more named sets of recipients, without actually
providing the individual mailbox address for each of those
recipients.
If, in the back end you are throwing the email string at a fully compliant RFC2822 mail server I would expect it to ‘just work’ but a small test of this syntax did not produce the expected mails.