I have a mailbox (in French) with the following structure:
me@example.com
|
|_Inbox
|_Brouillons (="Drafts")
|_Éléments envoyés (="Sent items")
|_Éléments supprimés (="Deleted items")
My users usually check their emails with a webmail or a mail client. But sometimes I need to add messages manually in the "Sent" folder, which has the name Éléments envoyés
, containing several accents and a whitespace.
Here is the relevant PHP code:
$imap_stream = imap_open("{imap.example.com:143/tls}", "me@example.com", "password");
imap_append($imap_stream, "{imap.example.com:143/tls}Éléments envoyés",
...
The above code does not work. If I try with a folder without accents, like Brouillons
, the messages are correctly copied.
Could it be an encoding problem? If I check the properties with Thunderbird, the location is shown as
imap://me%40example.com@imap.example.com/%26AMk-l%26AOk-ments%20envoy%26AOk-s
Thanks in advance!