I hope this isn't too easy to answer - I think I must be doing something fairly simple wrong.
I want to send an email from a PHP page, using SOAP so the mail appears in the sender's sent items, as if it was done in the usual way.
We're using Groupwise 8.02

Using the example code in phpClient/phpClient.php I have got a list of folders/emails in my mailbox, so the authentication and access to Groupwise is obviously working. However, in that file there isn't a send mail example, so I copied the one from phpSOAP/client.php and it doesn't work.....the error seems to be 59920 which might be something to do with the session missing, but I find this hard to believe since the folders can be retrieved with the same object.

Here is the code for mail sending I'm using:

$mail = new Mail();
$mail->subject = "php item";
$dist = new Distribution();
$from = new From();
$from->displayName = "Paul Green";
$from->email = "plg@imail.barton.ac.uk";
$dist->from = "plg@imail.barton.ac.uk";;
$dist->to = "Paul Green";
$rlist = new RecipientList();
$recip1 = new Recipient();
$recip1->displayName = "Peter";
$recip1->email = "pgh@imail.barton.ac.uk";
$recip2 = new Recipient();
$recip2->displayName = "Andy";
$recip2->email = "awt@imail.barton.ac.uk";
$rlist->recipient = array ($recip1, $recip2);
$dist->recipients = $rlist;
$mail->distribution = $dist;
$mp = new MessagePart();
$mp->_ = "This is a test!";
$mb = new MessageBody();
$mb->part = $mp;
$mail->message = $mb;
$sir = new sendItemRequest();
$sir->item = $mail;
$sires = $gwservice->sendItemRequest($sir);

Looking around, it seems to me that some of the objects haven't got the properties that the above code expects (eg the from object), so is the schema wrong somewhere?
What I would like, but couldn't find, is some simple example code that works!
Does anyone know the simplest way to send an email via SOAP?

Many thanks in advance for any help anyone can give.

Paul Green
Barton Peveril College