Extension development
little question to JobInfo

A job can have only one sender but multiple recipients, so there is separate data for each recipient within the job.

You should at least be able to get the From field without enumerating anything, though, otherwise there is some other problem with the code. Try checking the result of ji_get_job_info to make sure you actually get something in the JobInfo record.

/Rolf 

<p>A job can have only one sender but multiple recipients, so there is separate data for each recipient within the job.</p><p>You should at least be able to get the From field without enumerating anything, though, otherwise there is some other problem with the code. Try checking the result of ji_get_job_info to make sure you actually get something in the JobInfo record.</p><p>/Rolf </p>

Hello

My question maybe more a basic c programming questions then a other..

I try to use a the from and to infos from a job.

With the metho:

 JOBINFO structJobInfo;

mi->ji_get_job_info(job,&structJobInfo);

I get a referenc of the current processing job.

But when I try to read the "structJobInfo.To" or "structJobInfo.From" like this:

mi->logstring (20100, LOG_NORMAL,&structJobInfo.to);

The system log entry will be empty? Why?

How I have to use this in the right way?

 

Thanks for your help :)

 


<p>Hello</p><p>My question maybe more a basic c programming questions then a other.. </p><p>I try to use a the from and to infos from a job. </p><p>With the metho: </p><p><i> JOBINFO structJobInfo;</i></p><p><i>mi->ji_get_job_info(job,&structJobInfo);</i></p><p>I get a referenc of the current processing job.</p><p>But when I try to read the "structJobInfo.To" or "structJobInfo.From" like this:</p><p><i>mi->logstring (20100, LOG_NORMAL,&structJobInfo.to);</i></p><p>The system log entry will be empty? Why?</p><p>How I have to use this in the right way?</p><p> </p><p>Thanks for your help :)</p><p> </p><p> </p>

Not sure about the C specifics (I program in Pascal mainly), but you will need to use ji_get_next_element to enumerate recipients.

/Rolf  

<p>Not sure about the C specifics (I program in Pascal mainly), but you will need to use ji_get_next_element to enumerate recipients.</p><p>/Rolf  </p>

ok, but I can't imagine how this real work.

First I've to get a pointer to the structure with the jobhandle

1) ji_get_job_info()

Then I've call the method

2)ji_get_next_element()

To fill the structure with data?

I've found this code snipped:

           for(rcpt = mi->ji_get_next_element(job, JE_ANY, &structJobInfo);
             rcpt != 0 && max_rcpt>0;
             rcpt = mi->ji_get_next_element(job, JE_ANY, &structJobInfo), --max_rcpt) 

 

Why I've to loop over the job? This is a little bit mystic for me.. ;o)

<p>ok, but I can't imagine how this real work.</p><p>First I've to get a pointer to the structure with the jobhandle </p><p>1) ji_get_job_info()</p><p>Then I've call the method </p><p>2)ji_get_next_element()</p><p>To fill the structure with data? </p><p>I've found this code snipped:</p><p><i>           for(rcpt = mi->ji_get_next_element(job, JE_ANY, &structJobInfo);              rcpt != 0 && max_rcpt>0;              rcpt = mi->ji_get_next_element(job, JE_ANY, &structJobInfo), --max_rcpt)  </i></p><p> </p><p>Why I've to loop over the job? This is a little bit mystic for me.. ;o) </p>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft