Professional Web Applications Themes

get sender-address - PHP Development

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 ...

  1. #1

    Default get sender-address

    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!


    Ron Guest

  2. #2

    Default Re: get sender-address

    Ron Eggler work wrote:
     
    <snip> 

    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.
    Colin Guest

  3. #3

    Default Re: get sender-address

    Colin McKinnon wrote: 
    >
    > Are you reading the output in a browser? Try
    > echo "FromAddress: ".htmlentities($overview->from)."<br>\n";[/ref]
    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.

    chEErs roN


    Ron Guest

  4. #4

    Default Re: get sender-address

    Ron Eggler work wrote: 
    >>
    >> Are you reading the output in a browser? Try
    >> echo "FromAddress: ".htmlentities($overview->from)."<br>\n";[/ref]
    > 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.
    >[/ref]
    can't anybody help me?
    Thank you!


    Ron Guest

Similar Threads

  1. How do I get the sender's address of a web service or SOAP message?
    By Richard Martino in forum ASP.NET Web Services
    Replies: 4
    Last Post: February 1st, 11:04 PM
  2. Send Email (CDONTS or MAPI) Internally And Resolve Sender's Address
    By skeetx@hotmail.com in forum ASP Components
    Replies: 1
    Last Post: December 17th, 06:44 AM
  3. Replies: 0
    Last Post: June 30th, 08:45 AM
  4. Replies: 1
    Last Post: August 10th, 05:33 PM
  5. Replies: 2
    Last Post: August 2nd, 10:53 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