Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview Wiki

little question to JobInfo

Last post 02-19-2009, 21:04 by Rolf Lindby. 3 replies.
Sort Posts: Previous Next
  •  02-16-2009, 16:55

    little question to JobInfo

    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 :)

     


  •  02-18-2009, 5:32

    • Rolf Lindby is not online. Last active: 2012-05-18, 23:27 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 17,215
    • BetaTeam Moderator SystemAdministrator

    Re: little question to JobInfo

    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  

  •  02-19-2009, 14:15

    Re: little question to JobInfo

    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)

  •  02-19-2009, 21:04

    • Rolf Lindby is not online. Last active: 2012-05-18, 23:27 Rolf Lindby
    • Top 10 Contributor
    • Joined on 05-08-2007
    • Stockholm, Sweden
    • SuperStar
    • Points 17,215
    • BetaTeam Moderator SystemAdministrator

    Re: 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 

View as RSS news feed in XML

Contact | Advertise | Host provider: PraktIT | Terms of Use | Privacy Statement
Copyright © 2007-2011 David Harris / Peter Strömblad. | Pegasus Mail Home Page