Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 03-29-2001, 04:44 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by JamesUS
I'm going to give this a shot during the school holidays (week after next), so watch out for a release in a few weeks
Easter Holidays?
Reply With Quote
  #22  
Old 03-29-2001, 05:28 PM
Guest
 
Posts: n/a
Default

Yup
Reply With Quote
  #23  
Old 04-10-2001, 05:40 AM
Sarge
Guest
 
Posts: n/a
Default

Easter is coming up!
IS this still a go?
Reply With Quote
  #24  
Old 04-10-2001, 12:58 PM
MrLister's Avatar
MrLister MrLister is offline
 
Join Date: Oct 2001
Posts: 434
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

add restrictions so only like 100 e-mails per day to one user.
Reply With Quote
  #25  
Old 04-10-2001, 01:31 PM
JamesUS's Avatar
JamesUS JamesUS is offline
 
Join Date: Oct 2001
Posts: 347
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I still plan to do it but I doubt it will be done any time particularly soon - it is a major hack to make.
Reply With Quote
  #26  
Old 04-10-2001, 02:59 PM
Sarge
Guest
 
Posts: n/a
Default

this could double the size of my board!
Reply With Quote
  #27  
Old 04-10-2001, 10:14 PM
dons
Guest
 
Posts: n/a
Default

The ability to receive a digest goes hand and hand with this I think. dcs
Reply With Quote
  #28  
Old 04-12-2001, 10:44 AM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i did start this a while ago, and got somewhere but not very far. Just in case this is any use to James:

PHP Code:
<?

require("./admin/global.php");

 function pop3_open($server, $port)  
  {
    global $POP3_GLOBAL_STATUS;

    $pop3 = fsockopen($server, $port);

    // Maybe some people need something like:
    // $pop3 = fsockopen($server, $port, &$errno, &$errstr, 30);
    
    if ($pop3 <= 0) return 0;

    $line = fgets($pop3, 1024);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] = substr($line, 0, 1);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULTTXT"] = substr($line, 0, 1024);

    if ($POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] <> "+") return 0;

    return $pop3;
  }

  function pop3_user($pop3, $user)
  {
    global $POP3_GLOBAL_STATUS;

    fputs($pop3, "USER $user\r\n");
    $line = fgets($pop3, 1024);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] = substr($line, 0, 1);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULTTXT"] = substr($line, 0, 1024);
    
    if ($POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] <> "+") return 0;

    return 1;
  }

  function pop3_pass($pop3, $pass)
  {
    global $POP3_GLOBAL_STATUS;

    fputs($pop3, "PASS $pass\r\n");
    $line = fgets($pop3, 1024);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] = substr($line, 0, 1);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULTTXT"] = substr($line, 0, 1024);
    
    if ($POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] <> "+") return 0;

    return 1;
  }
  
  function pop3_stat($pop3)
  {
    global $POP3_GLOBAL_STATUS;

    fputs($pop3, "STAT\r\n");
    $line = fgets($pop3, 1024);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] = substr($line, 0, 1);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULTTXT"] = substr($line, 0, 1024);

        if ($POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] <> "+") return 0;

    if (!eregi("+OK (.*) (.*)", $line, $regs)) 
        return 0;

    return $regs[1];
  }

  function pop3_list($pop3)
  {    
        global $POP3_GLOBAL_STATUS;
  
        fputs($pop3, "LIST\r\n");
        $line = fgets($pop3, 1024);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] = substr($line, 0, 1);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULTTXT"] = substr($line, 0, 1024);

        if ($POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] <> "+") return 0;

    $i = 0;
    while  (substr($line  =  fgets($pop3, 1024),  0,  1)  <>  ".")
    {
        $articles[$i] = $line;
        $i++;
    }
    $articles["count"] = $i;

    return $articles;
  }

  function pop3_retr($pop3, $nr)
  {
        global $POP3_GLOBAL_STATUS;
  
        fputs($pop3, "RETR $nr\r\n");
        $line = fgets($pop3, 1024);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] = substr($line, 0, 1);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULTTXT"] = substr($line, 0, 1024);

        if ($POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] <> "+") return 0;

    $i = 0;
        while  (substr($line  =  fgets($pop3, 1024),  0)  !=  ".\r\n")
        {
                $data[$i] = $line;
                $i++;
        }
        $data["count"] = $i;

        return $data;
  }


  function pop3_dele($pop3, $nr)
  {
        global $POP3_GLOBAL_STATUS;

        fputs($pop3, "DELE $nr\r\n");
        $line = fgets($pop3, 1024);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] = substr($line, 0, 1);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULTTXT"] = substr($line, 0, 1024);

        if ($POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] <> "+") return 0;


        return 1;
  }

  function pop3_quit($pop3)
  {
        global $POP3_GLOBAL_STATUS;

        fputs($pop3, "QUIT\r\n");
        $line = fgets($pop3, 1024);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] = substr($line, 0, 1);
        $POP3_GLOBAL_STATUS[$pop3]["LASTRESULTTXT"] = substr($line, 0, 1024);

        if ($POP3_GLOBAL_STATUS[$pop3]["LASTRESULT"] <> "+") return 0;

        return 1;
  }
  
  
// end of class.. this is where it starts :)



### CONNECT TO POP3 SERVER


// so we are connecting
 $pop3 = pop3_open("mail.techuk.com", "110");
 if (!$pop3) {
    printf("[ERROR] Failed to connect to localhost<BR>\n");
    return 0;
 }
 
// with thus username 
 if (!pop3_user($pop3, "testing@ascifi.com")) {
    printf("[ERROR] Username failed!<BR>\n");
    return 0;
 }
 
 // and this password
 if (!pop3_pass($pop3, "****")) {
    printf("[ERROR] PASS failed!<BR>\n");
    return 0;
 }
 
 
### END OF CONNECTION


### FIND OUT HOW MANY ARTICLES - FUTURE LOOP

// finding out how many articles there are. if none giving error message i think
 $articles = pop3_list($pop3);
 if (!$articles) {
    printf("[ERROR] LIST failed!<BR>\n");
    return 0;
 }
 
 
$listit = pop3_list($pop3);

$numrows = count ($listit);
for ($count = 0; $count < $numrows; ++$count) {

echo HtmlSpecialChars($listit[$count]);
echo "<br>";
}
  
  
### END OF ARTICLE COLLECTION
 
// re-fresh $count 
$count = 0;  

### PROCESS THE EMAIL ###

// first lets retrieve the email
$data = pop3_retr($pop3, 8);

// start loop on email array
$numrows = count ($data);
for ($count = 0; $count < $numrows; ++$count) {

// create variables from the whole message
$message .= HtmlSpecialChars($data[$count]);
$message_html .= HtmlSpecialChars($data[$count]);
$message_html .= "<br>";

// check to see if divide, if so tell script we are no dealing with the body
if ($data[$count] == "\r\n") {
$stop = "1";
}


## we are doing header stuff here ##
if ($stop != "1") {
$header2 .= $data[$count];

// first lets get the subject

if (eregi("Subject:", $data[$count], $arr)) {
$subject = substr($data[$count],9);

echo "<b>have found the subject</b><br>";
} else {
echo "failed to find the subject<br>";
}

// second the return email address

$foo = 'From: "Chris Padfield" <chris@freeontheweb.com>';

if (eregi("<([^>]*)>",$data[$count],$arr)) {
$email = $arr[1];

echo "<b>have got email</b><br>";
} else {
echo "failed to get email<br>";
}

## now we are creating the body ##
} elseif ($stop == "1") {


$body2 .=$data[$count];
}


// end the email array loop
}

### EMAIL HAS BEEN PROCESSED ###


### CHECK TO SEE IF USER IS BANNED ###

// first check to see if this user has been banned.

if ($email == "banned") {

echo "sorry.. you are banned ....";

} elseif ($ip == "banned") {

echo "sorry.. you are banned ....";

} else {


### END OF USER BANNING CHECK ALTHOUGH } CONTINUES TO END ###



### WHAT DO WE DO BASED ON SUBJECT ###

// first if empty:

if ($subject == "") {

echo "Uh oh, the subject is empty";

} elseif ($subject == "help") {

echo "ar... we need to send help now";

} elseif ($subject == "new thread") {

echo "we now need to start a new thread"; 

} elseif ($subject == "Subscribe") {

echo "we need to subscribe them to this forum";

} elseif ($subject == "Unsubscribe") {

echo "we need to unsubscribe them to this forum";

} elseif ($subject == "daily") {

echo "we need to change settings to daily";

} elseif ($subject == "instant") {

echo "we need to change settings to instant";

} else {

// now a "command" so probably a post (or an error). Need to extract info from subject.

$delimiter == "**";


if (eregi("([[:digit:]]{1,})",$subject,$arr)) {

$threadno = (trim($arr[1]));
echo $threadno;
 
} else {

echo "Serious problem... did not match anything at all! Send back email with error message";
 
}


// end of subject matching
}

// end of email and ip address check


### END OF SUBJECT PROCESSING ###







#### done parsing, lets do some printing of found variables

echo "<b>Subject:</b><br>";
echo subject;
echo "<P>";
echo "<b>Email:</b><br>";
echo $email;
echo "<P>";
echo "<b>Clean Subject</b><br>";
echo $threadno;
echo "<P>";
echo "<B>Message Html</b><br>";
echo $message_html;
echo "<P>";
echo "<B>Header:</b><br>";
echo $header2;
echo "<P>";
echo "<b>Body:</b><br>";
echo $body2;



?>
Reply With Quote
  #29  
Old 04-12-2001, 04:11 PM
JamesUS's Avatar
JamesUS JamesUS is offline
 
Join Date: Oct 2001
Posts: 347
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Chris - much appreciated
I will go through it properly a little later on
Reply With Quote
  #30  
Old 07-19-2001, 07:42 PM
writhe writhe is offline
 
Join Date: Nov 2001
Location: Houston
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

JamesUS-

Did you ever write the hack? I'm looking into setting up a bulletin board but am desperate to have your email support as a feature. Please let me know if it is finished, will be finished soon, or if someone else has already done so.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04493 seconds
  • Memory Usage 2,284KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete