CreateEmail and Multiple Email Addresses in incoming variable

ssolberg

VIP Member
We have been using CreateEmail for quite some time but apparently never had this situation. On an incoming E1 PDF, we have a variable that is populated with an email address so that the document can get emailed out. Been working great, no problems.

It appears they now want to put multiple email addresses in that variable so it is sent to multiple people. I assumed this would be no problem and had them enter (in their system) "[email protected];[email protected]" and then this would get picked up and put in the variable and work like a charm. I assumed that was the formatting since that is what it normally is in a mail client.

My variable came in fine but Create Email threw up and said "No valid recipients specified". So I must have something wrong. Read some documentation and if I'm reading it correctly, it wants me to edit the Job Ticket Template (Cemail_JDE.jtt) and add a line before the "%cpEmail:-TO" record that says "%cpEmail:-DELIMITERS," that is supposed to indicate the Comma is the delimter. It also appears it wants be to edit the "TO:" record to add another parameter?

I'm confused. I don't know how many addresses may potentially be entered so how would I know how many parameters. And can I assume it won't affect anything when I have only a single address?

Does anyone have an example of their JTT file to look at to see if I'm on the right track? Thanks in advance.
 
I think there are versions of Cemail and/or CformServer that have a 'quirk' in them where you need to declare in the JTT file what delimiter is being used for multiple email addresses. The versions I'm running don't require me to declare the delimiter.

Your JTT file would look something like this;

%PDF-1.0
%[CPOW]
%cpBegin
%cpEnd
%cpEmailBegin
%cpEmail:-DELIMITERS#!EmailDelimiter!#
%cpEmail:-TO#!ToAddress!#
%cpEmail:-FROM#!FromAddress!#
%cpEmail:-CC#!CCAddress!#
%cpEmail:-BCC#!BCCAddress!#
%cpEmail:-S#!Subject!#
%cpEmail:-TMPL#!Template!#
%cpEmail:-THIS#!MergedShowName!#
%cpEmailEnd
%[EndCPOW]

In Cdirector hard code the character that you'll be using as the delimiter - either comma (,) or semi-colon (;). That should be all you need to do. Give it a try and see what happens.


Karen.
 
Back
Top