Keywords:
Question:
I trying to get mail messages with a pattern no pattern option. But I always get all the mail messages.I'm working with the Postie extender WWPST32i.ddl from 07-03-00.
The subject field of some of the messages is the text:
Answer:
Here's some clarification on how pattern matching works in kGetMail.The help file has been changed as follows:
- pat and nopat are mutually exclusive; you can use one or the other but not both. So do NOT specify both inadvertently by doing something like: strcat(pat,"|",nopat), where nopat="". That will not work. Either specify:
msgs=kGetMail('','mail.dat','Thistle','','') ; pat matchormsgs=kGetMail('','mail.dat','|Butterfly','','') ;nopat match
- If you use the nopat, the vertical bar must precede it so we know it's the nopat option that's getting passed through.
- To do substring matches in subject titles, you can use the wildcard characters in the "pat", eg.,
msgs=kGetMail('','mail.dat','*Thistle*','','r4')but do not use the wildcard character matching in the "nopat" option. Nopat has the ability to search for substrings within Subject strings.Syntax: kGetMail(msgnumber,outputfile,pat,mailfolder,flags) OR kGetMail(msgnumber,outputfile,strcat("|",nopat),mailfolder,flags) "pat" is the wildcard pattern the subject of the email must match to process message (otherwise it is skipped.) "pat" and "nopat" are mutually exclusive; you cannot specify both. "nopat" is the wildcard pattern the subject of the email must not match to process message (otherwise it is skipped). To specify "nopat", you must put a vertical bar "|" before the "nopat", e.g., kGetMail('','mail.dat','|Butterfly','',''). "pat" and "nopat" are mutually exclusive; you cannot specify both.
Article ID: W14544Filename: kGetMail and Pattern Matching.txt