I am new to IMAP functions in PHP, and I have been commissioned to create a website to sell tickets.
I get the main email sending, but somehow I came across the Threaded Discussion obstacle.
I need to be able to send emails (both sent and received) in a multi-threaded conversation mode, just like an SMS tool for smartphones.
Most of the algorithms I found simply handled streaming inbound, excluding sent items. It would be nice if I helped me with this.
My final outcome will be, at first, an array of UNREAD letters grouped for each subject, each of which contains a trace of the exchange of emails belonging to that subject.
Something like that:
array ( [0] => array ( [0] => array ( 'date' => 'some date', 'sender' => 'some sender', 'message' => 'yes i am', 'subject' => 'Re: Fubar', 'status' => 'unread' ), [1] => array ( 'date' => 'some date', 'sender' => 'some sender', 'message' => 'are you from america?', 'subject' => 'Re: Fubar', 'status' => 'read' [2] => array ( 'date' => 'some date', 'sender' => 'some sender', 'message' => 'hello', 'subject' => 'Re: Fubar', 'status' => 'read' [3] => array ( 'date' => 'some date', 'sender' => 'some sender', 'message' => 'hi', 'subject' => 'Fubar', 'status' => 'read' ), [1] => array ( [0] => array ( 'date' => 'some date', 'sender' => 'some sender', 'message' => 'hell yeah!', 'subject' => 'Re: Skills', 'status' => 'unread' ), [1] => array ( 'date' => 'some date', 'sender' => 'some sender', 'message' => 'are you good enough?', 'subject' => 'Skills', 'status' => 'read' )