Results 1 to 1 of 1

Thread: IMAP and SMTP using php

  1. #1
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default IMAP and SMTP using php

    I have come accross a very nice script that displays your message count on your email inbox in a web page.

    However, the code is set up for IMAP and I use SMTP on my server. Does anyone know how/what I need to change in the script to have it work for SMTP?

    Code:
    <?php 
    $server = "mail.mydomain.com"; 
    $user = "XXXXXX"; 
    $password = "YYYYYY"; 
    $host = "{".$server.":143"."}"."INBOX"; 
    $msgstream = imap_open($host, $user, $password); 
    $check = imap_mailboxmsginfo($msgstream); 
    $count = $check->Nmsgs; 
    imap_close($msgstream); 
    // generate display image 
    $width = (strlen($count)*8)+8; 
    $im = @imagecreate($width, 18); 
    $background_color = imagecolorallocate($im,255,255,255); 
    $text_color = imagecolorallocate($im,0,0,0); 
    imagestring($im,4,4,2,$count,$text_color); 
    imagepng($im); 
    imagedestroy($im); 
    ?>
    Thanks to anyone for advice/help!

    NEVERMIND!! LOL I got it all figured out!
    Last edited by BLiZZaRD; 12-26-2005 at 12:39 PM.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •