Home > Archive > PHP Language > June 2005 > get sender-address
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
get sender-address
|
|
| Ron Eggler @ work 2005-06-08, 3:56 pm |
| Hi,
I'm trying to build a php-spam-filter which conects to any pop-acoount and
deletes the mails directly on the pop-server. so I won't have to call them
first. I thought I first should check, if the domain from the sender really
exists.
I got some problems to read the Sender-Address. I tried this:
code:
$mbox=handle to pop account
$header = imap_headerinfo ($mbox, $i);
$overview = imap_fetch_overview($mbox, "2,4:6");
echo "From: ".$header->senderaddress."<br>\n";
echo "To: ".$header->toaddress."<br>\n";
echo "Subject: ".$header->fetchsubject."<br>\n";
echo "Date: ".$header->udate."<br>\n";
echo "Reply to: ".$header->reply_toaddress."<br>\n";
echo "FromAddress: ".$overview->from."<br>\n";
In "$header->senderaddress" and in "$overview->from" there's no
"real-sender-address' in it. most, there are names without any
e-mail-address.
how to get the address?
Thanks!
| |
| Colin McKinnon 2005-06-08, 3:56 pm |
| Ron Eggler @ work wrote:
>
> I'm trying to build a php-spam-filter which conects to any pop-acoount and
<snip>
> In "$header->senderaddress" and in "$overview->from" there's no
> "real-sender-address' in it. most, there are names without any
> e-mail-address.
> how to get the address?
> Thanks!
Are you reading the output in a browser? Try
echo "FromAddress: ".htmlentities($overview->from)."<br>\n";
(then go read up on SPF)
(then install Spamassassin)
C.
| |
| Ron Eggler @ work 2005-06-08, 3:56 pm |
| Colin McKinnon wrote:
> Ron Eggler @ work wrote:
>
>
> Are you reading the output in a browser? Try
> echo "FromAddress: ".htmlentities($overview->from)."<br>\n";
hm, it stays empty. both lines are empty. no enty out of $overview:
echo "FromAddress: ".$overview->from."<br>\n";
echo "FromAddress2: ".htmlentities($overview->from)."<br>\n";
> (then go read up on SPF)
erm, I read up on it but cannot follow 100%. may you give me some additional
hints about it please?
It sounds to be an interesting thing....
> (then install Spamassassin)
I already got it but I want a spam-filter that filters the mails directly on
the pop server so they don't have to be called. I also thought about adding
a white and blacklist to my filter.
chEErs roN
| |
| Ron Eggler @ work 2005-06-09, 3:56 am |
| Ron Eggler @ work wrote:
> Colin McKinnon wrote:
> hm, it stays empty. both lines are empty. no enty out of $overview:
> echo "FromAddress: ".$overview->from."<br>\n";
> echo "FromAddress2: ".htmlentities($overview->from)."<br>\n";
>
>
> erm, I read up on it but cannot follow 100%. may you give me some
> additional hints about it please?
> It sounds to be an interesting thing....
>
>
> I already got it but I want a spam-filter that filters the mails
> directly on the pop server so they don't have to be called. I also
> thought about adding a white and blacklist to my filter.
>
can't anybody help me?
Thank you!
|
|
|
|
|