Questions tagged [php-imap]
70 questions
0
votes
0 answers
PHP IMAP connection to Exchange works but throws errors
Searched all through Server Fault and Stack Overflow, but cannot find any useful information regarding this issue I have. There are plenty of questions regarding getting connected to Exchange, but that's not where my issue is.
I am running php-imap…

Luke Pittman
- 870
- 4
- 12
0
votes
0 answers
How to set default encoding for imap_search?
Php functions imap_sort and imap_search have encoding parameter, its null by default, but if it’s set in code to null the error occupies:
Uncaught TypeError: imap_sort() expects parameter 6 to be string, null
code: \imap_sort($resource,…

Danil Pyatnitsev
- 2,172
- 2
- 26
- 39
0
votes
0 answers
What is the behaviour of imap_sort when $search_criteria are null?
The documentation of imap_sort can take $search_criteria as an argument, but by default, $search_criteria is set to NULL.
imap_sort ( resource $imap_stream , int $criteria , int $reverse [, int $options = 0 [, string $search_criteria = NULL [,…

L.A. Rabida
- 416
- 3
- 15
0
votes
0 answers
Retrieving email from outlook with imap_fetchbody() broken
I have been using php-imap-client for some time and has always worked great. The issue is that recently it seems to break with fetching email from outlook/office365 mailboxes now and I can't pinpoint the issue. As far as I know it seems to be…

Cesar Bielich
- 4,754
- 9
- 39
- 81
0
votes
1 answer
0
votes
1 answer
Stripping content from emails
I have written a script to retrieve emails from my IMAP server. All works fine.
I'd like to keep some of the HTML tags and so have written additional code to strip out tags not included within my allowed list - again, all working fine.
My issue is…

Mike
- 143
- 5
0
votes
1 answer
PHP imap_append with BCC
I'm handling a mailbox for an app, and after sending an e-mail, I'd like to append it in a "Sent" mailbox, and to be able to retrieve recipients (to, cc and bcc).
This works great with the following code...
$envelope = imap_mail_compose([
…

Ecorce
- 123
- 2
- 11
0
votes
0 answers
Cannot open mailbox with polish characters in name using php-imap library
I'm trying to create simple integration with imap mail account but I am not able to open Gmail default mailbox: Ważne.
Gmail returns mailboxes as follows:
array:9 [▼
0 => "{imap.gmail.com:993/imap/ssl}INBOX"
1 =>…

piotr
- 1,282
- 1
- 8
- 20
0
votes
1 answer
How can I read an XLSX mail attachment file with PHPExcel?
I am connecting through IMAP to get the XLSX attachments from a mailbox so I can convert these spreadsheets to PHP array data with PHPExcel, but when I load the file and convert it to array, the array is empty.
This is the function that gets the…

Josué Morales
- 58
- 5
0
votes
0 answers
PHP imap_open with NTLM hash
i have NTLM hash of MS exchange server. I can login with credentials using username and password and get mails information with php_imap() functions, I didn't found any information how to login to mailbox using NTLM hash. It's possible? PHP…

darjus
- 417
- 3
- 7
- 21
0
votes
1 answer
PHP imap_open(): Couldn't open stream to gmail
I'm getting this messages when I tried to use php-imap to retrieve emails from server using IMAP protocol. I started with gmail accounts. But when I tried to connect using imap_open() I get the following messages:
Warning: imap_open(): Couldn't open…

gvd
- 1,482
- 6
- 32
- 58
0
votes
0 answers
how to read body of imap and attachment both in php with encoding?
I have reading mail from IMAP in php.
when i reading mail from IMAP it works fine.
But when mail is with attachment then message body is unreadable however attachment downloading working fine.

Parth Bhatti
- 468
- 1
- 7
- 19
0
votes
1 answer
PHP imap Authentication fails on ubuntu but works on Windows
I have a same code on both servers Windows and Ubuntu. Windows' code works fine. it connects to email box and does all the operations. But the same code on Ubuntu server is showing Authentication error.
$this->econn =…

Hraday Joshi
- 159
- 1
- 10
0
votes
1 answer
How to fetch emails those are not stored in our database using php imap
I am working on vtiger CRM module for fetching emails from mail server using php imap with different applied conditions.
$hostname = '{imap.gmail.com:993/ssl/novalidate-cert}';
$username = 'myemail@gmail.com';
$password = 'mypswd';
$inbox =…

Pankaj Sharma
- 33
- 2
- 10
0
votes
0 answers
Email's Mailbox name in php imap
I am creating a mail client and have many mailboxes in that now i have a list of emails and i want to show on list that to which mailbox that email belongs
Suppose:
Show "Inbox" if email is from Inbox
Show "Some Custom Mailbox" if the email is from…

Shehroz Asmat
- 161
- 14