Help - Search - Member List - Calendar
Full Version: strange pop-problem
WorkTheWeb Forums > Webmaster Resources > PHP Help
Support our Sponsors!
Ron Eggler @ work
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!

Xenophaw
"Ron Eggler @ work" <[Email Removed]> wrote:
QUOTE
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!




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 <[Email Removed]>".
If you take out the ending '>', you change the addy into something not
acceptable from the server. [Email Removed] would also be fine.


I hope this answer your question.
--
Xenophaw

Xenophaw
"Xenophaw" <[Email Removed]> wrote:
QUOTE
"Ron Eggler @ work" <[Email Removed]> wrote:
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!




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 <[Email Removed]>".
If you take out the ending '>', you change the addy into something not
acceptable from the server. [Email Removed] would also be fine.


I hope this answer your question.
--
Xenophaw


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" <[Email Removed]> or
[Email Removed].


Sorry for the wrong answer.
--
Xenophaw

Ron Eggler @ work
Xenophaw wrote:
QUOTE
"Xenophaw" <[Email Removed]> wrote:
"Ron Eggler @ work" <[Email Removed]> wrote:
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!




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 <[Email Removed]>".
If you take out the ending '>', you change the addy into something
not acceptable from the server. [Email Removed] would also be
fine.


I hope this answer your question.
--
Xenophaw


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"
<[Email Removed]> or [Email Removed].


Sorry for the wrong answer.

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


PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.