Questions tagged [php-imap]
70 questions
0
votes
1 answer
How to Read Only limited E-Mails by IMAP in PHP?
I use IMAP to read mails from my mail server.
But, I have huge number of mails in my Inbox,
every time i try to test, it take a minutes to load.
I only want New, Unread, First 10 E-mails only.
For Reading Email :
// open IMAP connection
$dns =…

Shankar Thiyagaraajan
- 1,705
- 4
- 28
- 46
0
votes
3 answers
Can't install php imap extension on centos 7
Running command
sudo yum install php56w-imap
gives me the output:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
* webtatic:…

Xericoder
- 3
- 1
- 3
0
votes
1 answer
Get GMAIL message ID with php-imap library
I catch trouble with getting gmail message id without using API (standard php-imap library with login/password authorization). I found info about X-GM-THRID flag, but how can i use it with standard functions from this…

Wellgo
- 21
- 5
0
votes
1 answer
Php-cli imap_open always asking for a password
I'm trying to connect to a mailbox using imap_open, with the following simple code:
$con = imap_open(sprintf($host, '/novalidate-cert'), $userName, $password);
If I execute that via php-cli, it asks me for a password... and whatever the password I…

OnekO
- 41
- 1
- 8
0
votes
0 answers
imap_num_msg doesn't return correct amount
So I go to /home/myname/Maildir/new and I see three files in that folder.
In PHP I do imap_num_msg(imap_open("{localhost:143/novalidate-cert}INBOX", "myname", "mypass")) and I get 1 as the output.
Shouldn't the numbers be the same?
I do sendmail…

neubert
- 15,947
- 24
- 120
- 212
0
votes
1 answer
PHP imap_fetchbody() function does not return when section set to 1.2
Background
I am running the following code to retrieve emails using the IMAP PHP extension:

HelpingHand
- 1,045
- 11
- 26
0
votes
1 answer
php : imap message sequence number gets changed after deleting one email
I have one application where people can configure there email account through IMAP and perform operations like reading email, delete, move, etc. I am facing problem that on delete of one email other email gets deleted. After debugging I found that 2…

Tarun Jain
- 53
- 4
-1
votes
1 answer
How to read unseen mails in PHP
I wrote the following code to read mails from my mailbox to program. when i give "ALL" in imap_search i get all the mails. but when i give "SEEN" or "UNSEEN" I always get zero results. I used the php-imap library to fetch mails from the inbox of my…

Tanzeem
- 29
- 8
-1
votes
1 answer
Simple way to forward emails using PHP IMAP
I'm writing a script that will get all the new emails in different accounts on the same server, check for keywords and then move each email to different account and folder in that account depending on the keywords found.
I've been looking for a…

Suzanne Edelman
- 83
- 1
- 1
- 8
-1
votes
1 answer
Make email read using Gmail IMAP via PHP
I have a use case to fetch email attachments. I got this code from GitHub: imap-gmail.
Here this will extract attachments from all emails, but I need to make email read every time I check for attachments, and extract attachments only from new emails…

qwww
- 1,313
- 4
- 22
- 48