Read that file line by line in a loop. Break each line into body, subject and recipient parts and send emails. The example in the on-line help for FileOpen does almost what you want, just insert 3 more lines after FileRead( file_number, recipient ) GetToken(recipient, ",", body) GetToken(recipient, ",", subject) replace_all(recipient, ";", ",") Note that replace_all is a user-defined statement. You can copy it from the "Examples Jobs.dat" file. Make sure that body and subject do not have commas within their text. If they do you would need more sophisticated solution that the one above. : I have a CSV file of the format : EMAIL : BODY,SUBJECT,RECIPIENTX;RECIPIENTY;RECIPIENTZ : The first 2 columns are the email body and subject and will always be there, : the problem is that the third can be a number of columns not known but : will be separated by semi-colons : eg it could be : EMAIL BODY,SUBJECT,RECIPIENTX;RECIPIENTY;RECIPIENTZ : or : EMAIL BODY,SUBJECT,RECIPIENTX;RECIPIENTY : or : EMAIL BODY,SUBJECT,RECIPIENTX;RECIPIENTY;RECIPIENTZ;RECIPIENTA1 : how can I read this in using JAL ? Sorry I would normally try and figure it : out but this has been thrown upon me and has to be done this weekend and I : am desperate,
|