On Tue, May 16, 2017 at 12:32 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
I don't see where it helps with adding parms either. I can easily add a
parm to an existing proc as *NOPASS:*OMIT and not have to worry about
existing callers.
Yes, but you're missing the point of not needed to put tons of
omit/nopass parameters in a call or know the sequence of them.
The design works ok in your MailTool product, but your really only setting
parms for one procedure, SendMail().
For now just one, but I could easily add more and most likely will.
Also, check out the other docs that are there for G4G and G4MS. They
have many more procedures. Here's a couple:
http://docs.bvstools.com/home/greentools-for-google-apps/docs/addon-library/g4ggcp
or
http://docs.bvstools.com/home/greentools-for-google-apps/docs/addon-library/g4ggdrv
The docs here have the settable variables in the callable procedures
(that "do something") themselves instead of the docs for setValue().
Something I'm working on getting more normalized.
Personally, I'd have used a NewMail() with a basic set of required &
optional parameters. Then have additional procs like your
#mailtool_addAttachment() to set the more uncommon parms.
NewMail('charles@xxxxxxxxxxxx':*OMIT
:'somebody@xxxxxxxxxxxxx':*OMIT
:'Re: Hello'
:'Hi There!'
);
addBCCRecipient('boss@xxxxxxxxxxxx');
SendMail();
Not me. If I were to do this way, I would have just added the parms
to the SendMail() procedure.
Not only does my method lead to self-documentation, but you don't need
to know the order or the parms. We're talking over 40 and counting
possible parameters.
if (#mailtool_init() >= 0);
rc = #mailtool_setValue('from_email':'jimmyj@xxxxxxxxxxxxxxxx');
rc = #mailtool_setValue('subject':'test email');
rc = #mailtool_setValue('message':'this is the message \n\n
newline.');
rc = #mailtool_addTORecipient('mybrother@xxxxxxxxxxx');
rc = #mailtool_sendMail(errMsg);
endif;
or
if (#mailtool_init() >= 0);
rc = #mailtool_setValue('configuration_file':<your config file>);
rc = #mailtool_loadDefaults();
rc = #mailtool_addTORecipient('mybrother@xxxxxxxxxxx');
rc = #mailtool_sendMail(errMsg);
endif;
Again, especially with email and the web apis I use with G4G and G4MS,
there are MANY possible parameters. This is the solution I chose a
few years ago and it's working great, as I hoped.
I actually want to update my GETURI to this but it's just too big of a
change for now for customers using it as it is.
I've done it both ways, and I can say for SURE I prefer this approach.
As an Amazon Associate we earn from qualifying purchases.