Professional Web Applications Themes

strange pop-problem - PHP Development

Hi, I got a strange problem: I can establish a connection to a pop-server with following line: $mbox = imap_open ("{".$server."/pop3/notls:110}INBOX", $user, $pass); then I get several variables back over this connection. I also get the header of every mail by: $header = imap_headerinfo ($mbox, $i); and then I get the sender by $header->senderaddress and I wanna check if it contains an '' with: if (strpos($header->senderaddress,"")) I would like to check if the domain exists so I check for a '>' at the end: if (strpos($header->senderaddress,">")) { echo "snip<br>\n"; $URL=substr($URL,0,-1); } here is the problem: if I got it like ...

  1. #1

    Default strange pop-problem

    Hi,
    I got a strange problem:
    I can establish a connection to a pop-server with following line:
    $mbox = imap_open ("{".$server."/pop3/notls:110}INBOX", $user, $pass);
    then I get several variables back over this connection.
    I also get the header of every mail by: $header = imap_headerinfo ($mbox,
    $i);
    and then I get the sender by $header->senderaddress and I wanna check if it
    contains an '' with:
    if (strpos($header->senderaddress,""))
    I would like to check if the domain exists so I check for a '>' at the end:
    if (strpos($header->senderaddress,">"))
    {
    echo "snip<br>\n";
    $URL=substr($URL,0,-1);
    }
    here is the problem: if I got it like this, the browser gives the error:
    Warning: imap_open(): Couldn't open stream
    {pop.rideon.ch/pop3/notls:110}INBOX in /srv/www/htdocs/web2/html/php/pop.php
    on line 7
    Can't connect: POP3 connection broken in command
    and if I gonna comment out the line '$URL=substr($URL,0,-1);' in the if() it
    works great. why the hell?????
    Thank you!



    Ron Guest

  2. #2

    Default Re: strange pop-problem

    "Ron Eggler work" <com> wrote: 

    Usually the '>' character doesn't mean there is a domain included in the
    email addy. That because, normally, an email addy has the format (taking in
    example my email) "Xenophaw <org>".
    If you take out the ending '>', you change the addy into something not
    acceptable from the server. org would also be fine.


    I hope this answer your question.
    --
    Xenophaw


    Xenophaw Guest

  3. #3

    Default Re: strange pop-problem


    "Xenophaw" <org> wrote: 
    >
    > Usually the '>' character doesn't mean there is a domain included in the
    > email addy. That because, normally, an email addy has the format (taking
    > in example my email) "Xenophaw <org>".
    > If you take out the ending '>', you change the addy into something not
    > acceptable from the server. org would also be fine.
    >
    >
    > I hope this answer your question.
    > --
    > Xenophaw
    >[/ref]

    I correct myself. As it's clear from the first line of every reply message,
    the format is, in the case of my email, "Xenophaw" <org> or
    org.


    Sorry for the wrong answer.
    --
    Xenophaw


    Xenophaw Guest

  4. #4

    Default Re: strange pop-problem

    Xenophaw wrote: 
    >>
    >> Usually the '>' character doesn't mean there is a domain included in
    >> the email addy. That because, normally, an email addy has the format
    >> (taking in example my email) "Xenophaw <org>".
    >> If you take out the ending '>', you change the addy into something
    >> not acceptable from the server. org would also be
    >> fine.
    >>
    >>
    >> I hope this answer your question.
    >> --
    >> Xenophaw
    >>[/ref]
    >
    > I correct myself. As it's clear from the first line of every reply
    > message, the format is, in the case of my email, "Xenophaw"
    > <org> or org.
    >
    >
    > Sorry for the wrong answer.[/ref]

    No problem. Thanks for checking the problem anyway. :)


    Ron Guest

Similar Threads

  1. Strange problem...
    By Andy in forum Windows Server
    Replies: 3
    Last Post: July 21st, 03:01 PM
  2. A very strange problem
    By Dino in forum Microsoft SQL / MS SQL Server
    Replies: 5
    Last Post: July 21st, 01:03 PM
  3. [PHP] Strange Problem
    By Philip Olson in forum PHP Development
    Replies: 0
    Last Post: July 14th, 03:42 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139