@MailSend

I have an agent that is run based on 2 fields in the Query Close Event.

It has a To: based on a field, CC: to 2 people, BCC: to 1 person, a Subject field, a Remark Field, and a Body field based on a field.

Here is my code:

@MailSend(ClientManager; “Kathleen M. Roane”:“Jacqui C. Moffett”;“Laura L. Ravlin”; Date+" - " + ClientCode + " " + “Consulting Summary Emotional Read”; “The following emotional read was written…”; “ForSICUseOnly”; [IncludeDoclink]);

@SetField(“EReadSent”; “Yes”)

I have looked at it numerous times and cannot figure out why it won’t run…Any help is appreciated.

Subject: @MailSend - saw this in Designer help

When you use the [IncludeDocLink] flag to include a link to the current document, you should set the bodyFields parameter to null (“”).

Subject: RE: @MailSend - saw this in Designer help

Well, I tried it with and without the flag and it still doesn’t work…

Subject: RE: @MailSend - saw this in Designer help

No, you don’t have to set it to “”, you just have to have something there to hold the argument position – a la any optional argument in any typical function. (Although very, very few @mailsends have a need for a non-null BodyFields argument.)

Subject: RE: @MailSend - saw this in Designer help

Just copying/pasting what I read - never tried it and wouldn’t be surprised if the documentation is a little off.

Subject: It works, partially!

I used the following code in an ACTION BUTTON:

@MailSend(“name”; “name”:“name”; Date+" - " + ClientCode + " " + “Consulting Summary Emotional Read”; “The following emotional read was written…”; “ForSICUseOnly”; [IncludeDoclink]);

@SetField(“Subject”; “Yes”)

Results: All messages delivered with subject line; however, did receive an error message that Consulting Summary Emotional Read could not found in Names and Address Book. ForSICUseOnly was found in the body field, but no doclink.

Hope this helps!

Subject: RE: It works, partially!

you’re missing the cc argument.

@MailSend(“name”;

“name”:“name”;

MISSING CC ARGUMENT;

Date+" - " + ClientCode + " " + “Consulting Summary Emotional Read”;

“The following emotional read was written…”;

“ForSICUseOnly”;

[IncludeDoclink])

After adding that argument, if ForSICUseOnly is a field name, its contents will be appended to the Body after “The following…” If not, the literal text “ForSICUseOnly” will appear instead.

Subject: @MailSend

Have you tested the agent from an action button? Will it work?

Subject: RE: @MailSend

I tried it in a button and it still doesn’t work.

Any other ideas?