Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Closed Thread
 
LinkBack Thread Tools
Old 01-12-2008, 07:01 AM   #1 (permalink)
Registered User
 
Join Date: Feb 2007
Location: london
Posts: 28
OS: window xp


Media auto responder setup

Hi
I am in the middle of setting up above auto responder for my website.
Instructions are as below:

Installation And Setup Instructions:

1) Create a folder named "responder" on your web server and copy ALL files in that folder.
Chmod 777 the folders 'temp' and 'media'

2) Create a new database

3) Modify the MYSQL database information using the new database
you have just created in the file include/globals.php

4) Run the installer program using:
http://www.yoursite.com/responder/install.php
Enter your Name, Email, Username, Password and click the "Install" button.
Please DO NOT forget to remove the install.php file after installation.

5) Modify the mail account username/password (main email address for domain*)
in the file robot/imap_globals.php. (<?php
// pop3 mail server connection parameters
$MailHost = "";IS MAIL HOST MY WWW.DOMAIN.COM?
$MailUser = "";WHAT SHOULD I ENTER HERE EXPLAIN IN DETAILS PLEASE
$MailPassword = "";WHICH PASSWORD?
?>

Note: For $MailHost, the variable is usually yoursite.com.
If you are unsure of your mail server, please contact your host administrator

6) Add to cron job php responder/robot/check_deliver_broadcast_messages.php once at a minute

(
PHP Code:
<?php
// Sends broadcast messages
// Set CRON for each 5 minutes
// Written by Michel Komarov [url]http://icoder.com[/url] (2005-12-13)
function error_page($error_message) { return "$error_message"; } 
    
$bunchSize 300;
    
$bunchPause 60//sec
    
$bunchInterval 600//sec (from CRON timing)
    
$cron_file "../temp/broadcast.cron";
    if (
file_exists($cron_file)) {
        
$cron file_get_contents($cron_file);
        if ((
$bunchInterval) + $cron time()) exit;
    }
    if (
$fh fopen($cron_file"w")) {
        
fputs($fhtime());
        
fclose($fh);
    }

    require(
"../include/globals.php");
    require(
"../include/db_mysql.php");
    require(
"../include/phpmailer.php");
    require(
"../include/mail.php");

    
set_time_limit(0);
    
$db = new DB_Sql;
    
$db2 = new DB_Sql;

    
$queryWhere "FROM broadcastmessages
                    WHERE 
                    broadcastmessages_delivery_date <= NOW() AND
                    broadcastmessages_sent = '0' "
;
    
$db->query("SELECT * $queryWhere");
    if ((
$count $db->num_rows()) > 0) {
        if (
$fh fopen("../temp/broadcast.log""a")) {
            
fputs($fh"\n".date("Y-m-d H:i:s")." Messages: $count\n");
            
fclose($fh);
        }
    }
    
$msg 0;
    while (
$db->next_record()) {
        if (
== ((++$msg) % $bunchSize)) {
            if (
$fh fopen("../temp/broadcast.log""a")) {
                
fputs($fh"\t$msg sent\n");
                
fclose($fh);
            }
            if (
$fh fopen($cron_file"w")) {
                
fputs($fhtime());
                
fclose($fh);
            }
            
sleep($bunchPause);
        }
        
$broadcast_message_id $db->f("broadcastmessages_id");

        
$error SendBroadcastMessage($broadcast_message_id);
        if (
$error) {
            if (
$fh fopen("../temp/broadcast.log""a")) {
                
fputs($fh" $error.");
                
fclose($fh);
            }
        }

        
$db2->query("UPDATE broadcastmessages
                        SET broadcastmessages_sent = '1'
                        WHERE broadcastmessages_id = '$broadcast_message_id'"
);
    }
    
unlink($cron_file);
    if (
$count 0) {
        if (
$fh fopen("../temp/broadcast.log""a")) {
            
fputs($fh"\t$msg Sent.\n");
            
fclose($fh);
        }
    }
?>
)
7) Add to cron job php responder/robot/check_deliver_followup_messages.php once at one day
(
PHP Code:
<?php
// Sends follow-up and instant messages
// Set CRON for each 5 minutes
// Written by Michel Komarov [url]http://icoder.com[/url] (2005-12-13)
function error_page($error_message) { return $error_message; }
    
$bunchSize 300;
    
$bunchPause 60//sec
    
$bunchInterval 600//sec (from CRON timing)
    
$cron_file "../temp/followup.cron";
    if (
file_exists($cron_file)) {
        
$cron file_get_contents($cron_file);
        if ((
$bunchInterval) + $cron time()) exit;
    }
    if (
$fh fopen($cron_file"w")) {
        
fputs($fhtime());
        
fclose($fh);
    }

    require(
"../include/globals.php");
    require(
"../include/db_mysql.php");
    require(
"../include/phpmailer.php");
    require(
"../include/mail.php");

    class 
DB_Sql_Log extends DB_Sql {
        var 
$Write_Log false;
        var 
$Halt_On_Error "report";
        function 
haltmsg($msg) {
            if (
$this->Write_Log && ($fh fopen("../temp/followup.log""a"))) {
                
fputs($fh"Database error: $msg\nMySQL Error: {$this->Errno} ($this->Error)\n");
                
fclose($fh);
            }
        }
    }

    
set_time_limit(0);
    
$db  = new DB_Sql_Log;
    
$db2 = new DB_Sql;
    
$query "SELECT messages_id, subscribers_id, subscribers_email, messages_interval
                    FROM messages, subscribers, users
                    WHERE 
                    users_id = messages_user_id AND
                    users_id = subscribers_user_id AND
                    subscribers_active = '1' AND
                    subscribers_trouble_mailing < 2 AND
                    messages_interval > subscribers_messages_interval AND
                    TO_DAYS(subscribers_join_date + INTERVAL messages_interval DAY) = TO_DAYS(NOW()) "
;
    
$db->query("$query ORDER BY messages_interval");
    if (
== $db->Errno && ($count $db->num_rows()) > 0) {
        if (
$fh fopen("../temp/followup.log""a")) {
            
fputs($fh"\n".date("Y-m-d H:i:s")." Messages: $count\n");
            
fclose($fh);
        }
        
$db->Write_Log true;
        
$msg 0;
        while (
$db->next_record()) {
            if (
== ((++$msg) % $bunchSize)) {
                if (
$fh fopen("../temp/followup.log""a")) {
                    
fputs($fh"\t$msg sent\n");
                    
fclose($fh);
                }
                if (
$fh fopen($cron_file"w")) {
                    
fputs($fhtime());
                    
fclose($fh);
                }
                
sleep($bunchPause);
            }
            
$message_id $db->f("messages_id");
            
$subscriber_id $db->f("subscribers_id");
            
$subscriber_email $db->f("subscribers_email");
            
$messages_interval $db->f("messages_interval");

            
$error SendMessage2Subscriber($message_id$subscriber_id);
            if (
$error) {
                if (
$fh fopen("../temp/followup.log""a")) {
                    
fputs($fhdate("\tCan't send $subscriber_email\n"));
                    
fclose($fh);
                }
            }

            
$db2->query("UPDATE subscribers
                            SET subscribers_messages_interval='$messages_interval'
                            WHERE subscribers_id='$subscriber_id'"
);
        }
    }
    
unlink($cron_file);
    if (
$count 0) {
        if (
$fh fopen("../temp/followup.log""a")) {
            
fputs($fh"\t$msg Sent.\n");
            
fclose($fh);
        }
    }
?>
)

8) Add to cron job php responder/robot/check_instant_messages.php once at a minute
(
PHP Code:
<?php
    
// scriptul se executa la fiecare 1 minut
    // si verifica daca in INBOX (pt account-ul autoresp@{sitename})
    // au sosit mesaje destinate utilizatorilor (de ex: myuser@{sitename})
    // daca da, atunci inregistram persoana care a trimis mail ca si 
    // un subscriber pt utilizatorul "myuser", si in trimitem toate mesajele instante
function error_page($error_message) { } 

    require(
"imap_globals.php");
    require(
"imap_functions.php");
    require(
"../include/globals.php");
    require(
"../include/db_mysql.php");
    require(
"../include/phpmailer.php");
    require(
"../include/mail.php");

    
set_time_limit(0);
    
$db = new DB_Sql;

    
$message_box imap_open("{".$MailHost.":110/pop3}INBOX"$MailUser$MailPassword);

    if (
$message_box != false)
    {
        
$message_number imap_num_msg($message_box);
        
$headers getHeaders($message_box1$message_number);

        
// parcurgem mesajele
        
for ($i=1$i<=$message_number$i++)
        {
            
$subject $headers[$i][2];
            
$uid $headers[$i][6];
            
$from_name $headers[$i][1];

            
// extragem numai numele (fara adresa de mail)
            
$pos strpos($from_name"<");

            if (
$pos === false)
                
$from_name $from_name;
            else
                
$from_name substr($from_name0$pos);

            
$head imap_fetchheader($message_box$uidFT_UID);
            
$header_info imap_headerinfo($message_box$uidFT_UID);

            
$from $header_info->from;
            
$to $header_info->to;

            foreach (
$from as $id => $object)
            {
                
$from_address $object->mailbox "@" $object->host;
            }

            foreach (
$to as $id => $object)
            {
                
$to_address $object->mailbox "@" $object->host;
                
$to_user $object->mailbox;
            }

            
$body imap_body($message_box$uidFT_INTERNAL);

            
// vedem daca mesajul este adresat vreunui user al aplicatiei
            
$query "SELECT * 
                        FROM users 
                        WHERE users_username = '$to_user' "
;
            
$db->query($query);

            if (
$db->num_rows() != 0)
            {
                
// da, exista un user caruia i se adreseaza mailul primit
                
$db->next_record();
                
$user_id $db->f("users_id");

                
// verificam daca nu avem deja un subscriber cu email-ul dat
                // pt user-ul caruia i s-a trimis email
                
$query "SELECT * 
                            FROM subscribers
                            WHERE 
                                subscribers_user_id = '$user_id' AND
                                subscribers_email = '$from_address' "
;
                
$db->query($query);

                if (
$db->num_rows() != 0)
                {
                    
// gasim id-ul subscrisului
                    
$db->next_record();
                    
$subscriber_id $db->f("subscribers_id");
                }
                else
                {                            
                    
// inregistram persoana care a trimis mail 
                    // ca subscriber al user-ului caruia ii era destinat mail-ul
                    
$_head addslashes($head);
                    
$query "INSERT INTO subscribers (
                                subscribers_name,
                                subscribers_email,
                                subscribers_user_id,
                                subscribers_header,
                                subscribers_join_date
                                ) VALUES (
                                '$from_name',
                                '$from_address',
                                '$user_id',
                                '$_head',
                                NOW()
                                )"
;
                    
$db->query($query);

                    
// gasim id-ul subscrisului numai ce adaugat
                    
$subscriber_id mysql_insert_id($db->link_id());
                }

                
// trimitem toate mesajele instante ale user-ului subscrisului                
                
$query "SELECT * 
                            FROM messages 
                            WHERE 
                                messages_user_id = '$user_id' AND
                                messages_interval = '0' AND
                                messages_disabled = '0' "
;
                
$db->query($query);

                while (
$db->next_record())
                {
                    
SendMessage2Subscriber($db->f("messages_id"), $subscriber_id);
                }

                
// stergem mesajul
                
imap_delete ($message_box$uidFT_UID);
            }
        }

        
imap_expunge($message_box);
        
imap_close($message_box);
    }

?>
)

If you have ability it would be better to install the check_POP3_mailbox.pl Perl-script.
It has a powerful bounced email manager.

The check_POP3_mailbox.pl requires the Net::POP3, DBI and DBD::mysql modules installed.

You have to edit the variables inside the file:

# pop3 mail server connection parameters
$mailHost = "yourdomain.com"; Please explain
$mailUser = "username"; Which username???
$mailPassword = "password";

# Database connection parameters
$dbName = "responder";
$dbUser = "responder";
$dbPass = "password";
$dbHost = "localhost";

You should upload the check_POP3_mailbox.pl file into cgi-bin folder with ASCII-text ftp-mode
then set permissions (chmod) to 755.
Set the cron job (point 8) as
/usr/bin/perl /absolute-path/cgi-bin/check_POP3_mailbox.pl


*This email address must have the ability to catch all emails received
for that domain that have no address (catch all, default email address)

Running The Software:
Login: http://www.yoursite.com/responder/index.php


Thanks in advance for yourhelp
Heero1

Last edited by wmorri; 11-24-2009 at 12:37 PM. Reason: added php tags where needed for ease of reading
heero1 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 01-14-2008, 03:48 AM   #2 (permalink)
TSF Enthusiast
 
KoosHopeloos's Avatar
 
Join Date: Nov 2004
Posts: 555
OS: Windows XP Pro & Windows Vista Ultimate browsing the web with FF, Opera, Safari and IE.


Re: Media auto responder setup

@ Heero1: Welcome to TSF!

I'm not quite sure how we can help you. Can you be more specific? Where do you get stranded?
__________________
KoosHopeloos, straight to you from .nl via the world wide web!

KoosHopeloos is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 01-14-2008, 11:12 AM   #3 (permalink)
Registered User
 
Join Date: Feb 2007
Location: london
Posts: 28
OS: window xp


Re: Media auto responder setup

opt in page is on my website with name and email caputuring box.when I filled in name and email(to test)following message pops up:

404 Error - Not Found
The resource you have requested could not be found on the server. There are many possible reasons for this. Either the file does not exist, there is an error in your request, or the file is not accessible in the requested directory. Please verify that:

You have used the proper case; requests ARE case-sensitive!
You have entered the URL correctly. (i.e. proper directory/filename)
You used the FULL URL. (i.e. proper file type: .html, .gif , .jpg, etc.)
You use a tilde (~) before user directories. (i.e. www.furcen.org/~jurann/ )
The user/file still exists on this server.
heero1 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 01-21-2008, 06:35 AM   #4 (permalink)
TSF Enthusiast
 
KoosHopeloos's Avatar
 
Join Date: Nov 2004
Posts: 555
OS: Windows XP Pro & Windows Vista Ultimate browsing the web with FF, Opera, Safari and IE.


Re: Media auto responder setup

@ heero1: Have you followed the instructions to set up the responder as you gave in your first post?
__________________
KoosHopeloos, straight to you from .nl via the world wide web!

KoosHopeloos is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 06-20-2008, 04:27 AM   #5 (permalink)
Registered User
 
Join Date: Jun 2008
Posts: 3
OS: XP


Re: Media auto responder setup

I have the same problem and can't seem to figure out as I am also trying to install an autoresponder. Can anyone help me.
ezeemart is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 06-20-2008, 01:43 PM   #6 (permalink)
Registered User
 
chaosprime's Avatar
 
Join Date: Jun 2008
Location: New Jersey
Posts: 1
OS: Windows XP SP2


Re: Media auto responder setup

This means that the form submission URL (action attribute on the form tag) in your form document is wrong. It's not clear to me how that gets set up when you're using this software, but it's where the problem is.
chaosprime is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 06-05-2009, 07:29 PM   #7 (permalink)
Registered User
 
Join Date: Jun 2009
Posts: 2
OS: window xp


Re: Media auto responder setup

I am trying to install Media Autoresponder. I am stuck on step 3.

3) Modify the MYSQL database information using the new database
you have just created in the file include/globals.php

How do I modify MYSQL and how do I access it to modify?
BestBizOps4u is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 06-07-2009, 04:00 PM   #8 (permalink)
Registered User
 
Join Date: Jun 2009
Posts: 2
OS: window xp


Re: Media auto responder setup

I wish I could get help with my Media Autoresponders but it looks like this forum has been abandoned.
BestBizOps4u is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 06-07-2009, 07:39 PM   #9 (permalink)
Moderator/Fedora Amb.
 
wmorri's Avatar
 
Join Date: May 2008
Location: /pm/etc
Posts: 2,815
OS: Window 7/Fedora 10

My System

Send a message via AIM to wmorri
Re: Media auto responder setup

Give it a little time. Some of the staff, has a life outside of the forum. But they will be back to help you.
__________________


Linux Forever!

wmorri is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 11-24-2009, 04:43 PM   #10 (permalink)
Moderator: Design
 
dm01's Avatar
 
Join Date: Oct 2006
Location: Richmond, B.C.; Canada
Posts: 1,438
OS: Windows XP [Version 5.1.2600] SP3 | Ubuntu Jaunty Jackalope | Windows 7 BETA

My System

Re: Media auto responder setup

Due to the many now-inactive users who have posted on this thread, I have made the decision to lock this thread.

@suemd: I have moved your post to its own thread.

If you still require assistance, please make a NEW thread. Hijacking a thread is not looked upon with kindness.

Thank you for your understanding.
__________________


Validate your Markup Validate your CSS Notepad++
Please use [html], [php], and [code] when posting code or markup.
I do not help by Private Message or e-mail. If for some reason I have over-looked a reply to a thread that I have previously replied to, then send me a message.
dm01 is online now  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Closed Thread


Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 09:31 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

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