Jump to content

imap set mail


nivas_kumar

Recommended Posts

hi , I am beginner in php. now i am working  imap functions in php.

Now Inbox function working correctly using following coding. But I cannot display sent items please help me.

inbox coding listed below.

// inbox coding

$mailbox = imap_open("{localhost:110/pop3}INBOX", "localuser", "localuser");

print_r(imap_errors());

$mails = imap_fetch_overview($mailbox,"1:*", FT_UID);

$return = '<table width="500" cellspacing=0 cellpading=0>

<tr><td bgcolor="#999999"><input type=checkbox name=checkall onClick="selectalltocheck(this.value)"></td>

<td bgcolor="#999999"><b>No</b></td>

<td bgcolor="#999999"><b>From</b></td>

<td bgcolor="#999999"><b>Date / Time</b></td>

<td bgcolor="#999999"><b>Subject</b></td>

<td bgcolor="#999999"><b>Delete</b></td>

</tr>';

$size = count($mails);

$cmsg = 0;

for($i=$size-1;$i>=0;$i--)

{

$cmsg++;

$value = $mails[$i];

$return .= '<tr><td><div style="border: 1px solid #339999"><input type=checkbox name="mcheck[]" id="mcheck[]" value="'.$value->msgno.'"></div></td><td><div style="border: 1px solid #339999">'.$cmsg.'</div></td><td><div style="border: 1px solid #339999">'.$value->from.'</div></td><td><div style="border: 1px solid #339999">'.$value->date.'</div></td><td><div style="border: 1px solid #339999"><a href="'.$_SERVER['PHP_SELF'].'?id='.$value->msgno.'">'.$value->subject.'</a></div></td><td><div style="border: 1px solid #339999"><a href="'.$_SERVER['PHP_SELF'].'?del=del&id='.$value->msgno.'">Delete</a></div></td></tr>';

}

$return .= '</table>';

imap_close($mailbox);

echo $return;

 

 

Link to comment
https://forums.phpfreaks.com/topic/132384-imap-set-mail/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.