Results 1 to 9 of 9

Thread: Mass Mailer addon

  1. #1
    Join Date
    Mar 2008
    Location
    New York, NY
    Posts
    193

    Default Mass Mailer addon

    Hello,

    I got this mass mailer addon and it works perfectly but one problem. No subject.

    <?php
    /**
    * Alexander Mirvis
    */
    function mailall_install_addon()
    {
    $current_version = "1.1";
    global $conn, $config;
    require_once($config['basepath'].'/include/misc.inc.php');
    $misc = new Misc();
    //Check Current Installed Version
    $sql = 'SELECT addons_version FROM '.$config['table_prefix_no_lang'].'addons WHERE addons_name = \'mailall\'';
    $recordSet = $conn->Execute($sql);
    $version = $recordSet->fields[0];
    if ($version == '')
    {
    // Perform a new install. Create any needed databases etc, and insert version number into addon table.
    $sql = 'INSERT INTO '.$config['table_prefix_no_lang'].'addons (addons_version, addons_name) VALUES (\'1.1\',\'mailall\')';
    $recordSet = $conn->Execute($sql);
    $sql = 'ALTER TABLE '.$config['table_prefix'].'userdb ADD userdb_mailing_list CHAR(1) NOT NULL DEFAULT \'1\'';
    $recordSet = $conn->Execute($sql);
    return TRUE;
    }
    elseif ($version != $current_version)
    {
    //Perform Updates to database based on previous installed version.
    switch($version)
    {
    case '1';
    $sql = 'ALTER TABLE '.$config['table_prefix'].'userdb ADD userdb_mailing_list CHAR(1) NOT NULL DEFAULT \'1\'';
    $recordSet = $conn->Execute($sql);
    break;
    } // switch
    return TRUE;
    }
    return FALSE;
    }
    /**
    * show_admin_icons()
    * This function should return an array of the html links that should be shown on the administrative page.
    * @return array should return each link that shoudl be shown in the admin section. Should return a string if it is a single link, or an array for multiple links.
    **/
    function mailall_show_admin_icons()
    {
    global $config,$lang,$conn;
    error_reporting(0);
    $username = $_SESSION["username"];
    $result = mysql_query("select * from ".$config['table_prefix']."userdb WHERE userdb_user_name = '$username'");
    $row = mysql_fetch_array($result);
    $agent = $row['userdb_is_agent'];
    $admin = $row['userdb_is_admin'];
    if($admin == "yes")$member = "admin";
    if($admin == "no")$member = "member";
    switch ($member) {
    case 'admin':
    $admin_link = '<a href="index.php?action=addon_mailall_admin"><img src="images/en/mailall_button.jpg" border="0"></a>';
    break;
    case 'member':
    $admin_link = '';
    break;
    default:
    $admin_link = '';
    break;
    }
    return $admin_link;
    }

    function mailall_load_template()
    {
    $template_array = array('addon_mailall_link');
    return $template_array;
    }

    function mailall_run_action_user_template()
    {
    switch ($_GET['action']) {
    case 'addon_mailall_subscribe':
    $data = mailall_display_subscribe_page();
    break;
    case 'addon_mailall_unsubscribe':
    //$email = $_GET['email'];
    $data = mailall_display_unsubscribe_page();
    break;
    default:
    $data = '';
    break;
    } // End switch ($_GET['action'])
    return $data;
    }

    function mailall_run_action_admin_template()
    {
    switch ($_GET['action']) {
    case 'addon_mailall_admin':
    $data = mailall_display_admin_page();
    break;
    default:
    $data = '';
    break;
    } // End switch ($_GET['action'])
    return $data;
    }

    function mailall_run_template_user_fields($tag = '')
    {

    }
    // Addon Specific Function

    function mailall_display_addon_link()
    {
    $display = '<a href="index.php?action=addon_mailall_showpage">Mai lAll Test</a>';
    return $display;
    }
    // Addon Specific Function
    function mailall_display_addon_page()
    {
    $display = 'This is a Addon page';
    return $display;
    }
    // Addon Specific Function
    function mailall_display_admin_page()
    {
    global $config,$lang,$conn;
    $username = $_SESSION["username"];
    $sql = "SELECT * FROM ".$config['table_prefix']."userdb WHERE userdb_user_name = '$username'";
    $recordSet = $conn->Execute($sql);
    $admin = $recordSet->fields['userdb_is_admin'];
    if($admin == "yes"){
    if(!isset($_POST['submit']))
    {
    $display = '
    <form method="POST" action="index.php?action=addon_mailall_admin">
    <center><B><h4>'.$config['company_name'].' Mailing List - Mail Members</h4></B><br>
    <table border="0" align="center" cellpadding="1" bgcolor="#95a4fd"><tr><td>
    <table border="0" align="center" cellpadding="3" bgcolor="#ffffff">
    <tr><td>Select Recipients:</td><td>
    <select name="users">
    <option value="">Please Select</option>
    <option value="1">Mail All</option>
    <option value="2">Mail All Artists</option>
    <option value="3">Mail All Members</option>
    </select>
    </tr></td><tr><td>Your Name:</td><td>
    <input type="text" name="name"></td></tr>
    <tr><td>Your Email:</td><td>
    <input type="text" name="sender"></td></tr>
    <tr><td>Subject:</td><td>
    <input type="text" name="subject"></td></tr>
    <tr><td>Message:</td><td>
    <textarea name="message" cols="50" rows="6"></textarea></td></tr>
    <tr><td colspan="2" align="right">
    <input type="submit" name="submit" value="Mail All ->">
    </form></td></tr></table></td></tr></table><hr>
    ';
    } else {
    if($_POST['users'] == "1")$sql = "SELECT * FROM ".$config['table_prefix']."userdb WHERE userdb_mailing_list = '1'";
    if($_POST['users'] == "2")$sql = "SELECT * FROM ".$config['table_prefix']."userdb WHERE userdb_is_agent = 'yes' AND userdb_mailing_list = '1'";
    if($_POST['users'] == "3")$sql = "SELECT * FROM ".$config['table_prefix']."userdb WHERE userdb_is_agent = 'no' AND userdb_mailing_list = '1'";
    $recordSet = $conn->Execute($sql);
    $num_rows = $recordSet->RecordCount();

    if ($num_rows > 0)
    {
    $i = 0;
    $hold = "30";
    while (!$recordSet->EOF)
    {
    $to = $recordSet->fields['userdb_emailaddress'];
    $subject = $config['company_name'];
    $name = $_POST['name'];
    $sender = $_POST['sender'];
    $sender = $_POST['subject'];
    $message = $_POST['message'];
    $message .= '<br><br><hr><center><font size="1">To unsubscribe from any future mailings, please <a href="'.$config['baseurl'].'\index.php?action=addon_mailall_unsubscribe&emai l='.$to.'">click here</a></font>.';
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "From: $name <$sender>\r\n";

    @mail($to, $subject, $message, $headers);
    $i++;
    if($i == $hold) {
    sleep(3);
    $i = 0;
    }
    $recordSet->MoveNext();
    }
    }
    $display = "<font size=4 face=arial><center><br><br><br>Your Mail Has Been Sent to $num_rows recipients!";
    $display .= "<br><br><form><input type=button value=\"<< Go Back \" onClick=\"history.go(-1)\"></form>";
    }
    } else {
    $display = "You are not allowed access to this area!";
    }
    return $display;
    }
    function mailall_display_unsubscribe_page()
    {
    global $config,$lang,$conn;
    $email = $_GET['email'];
    $sql = "UPDATE ".$config['table_prefix']."userdb SET userdb_mailing_list = '0' WHERE userdb_emailaddress = '$email'";
    $recordSet = $conn->Execute($sql);
    $display = '<br><br><B>The Email Address: '.$email.' has been removed from our mailing list.<br><br>Thank you!';
    return $display;

    }
    ?>

    Can someone help me out plz? Thank you.

    MOVED to add-on Help and discussion. The General Discussion area is not to be used for requesting script assistance.
    OR Rulezzzz

  2. #2
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Mass Mailer addon

    The original "mailall" add-on is published at:
    http://support.open-realty.org/showthread.php?t=9658
    The author of this add-on is "kpearson" and not "Alexander Mirvis".

    In spite of the original add-on be 4 years old, I have tested it (with O-R v.2.5.8) and it worked just fine (the subject works). So I recommend you to use the original add-on.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  3. #3
    Join Date
    Mar 2008
    Location
    New York, NY
    Posts
    193

    Default Re: Mass Mailer addon

    Hello,

    Thank you very much for the response but where can I get the original addon?
    Thanx
    OR Rulezzzz

  4. #4
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Mass Mailer addon

    Quote Originally Posted by nycbrokerfreedotcom View Post
    Thank you very much for the response but where can I get the original addon?
    You don't see a link at my previous post???

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  5. #5
    Join Date
    Mar 2008
    Location
    New York, NY
    Posts
    193

    Default Re: Mass Mailer addon

    Hello,

    :-p Yes I did but that's the same one I downloaded in the first place and for some strange reason don't see the subject box.

    Thankx
    OR Rulezzzz

  6. #6
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: Mass Mailer addon

    Quote Originally Posted by nycbrokerfreedotcom View Post
    ...Yes I did but that's the same one I downloaded in the first place and for some strange reason don't see the subject box.
    Yes, you are right. I don't know what happened - for some reason kpearson did not replace the zip file he has published at the Forum. I have tested the add-on I had on my repository and assumed it was the same zip file - I was wrong.
    The latest add-on version you can download from his personal website:
    http://www.southtexasweb.com/addons/...nloads-10.html
    This one has the subject working.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  7. #7
    Join Date
    Mar 2008
    Location
    New York, NY
    Posts
    193

    Default Re: Mass Mailer addon

    Thank you very much. Really appreciate it. :-)
    OR Rulezzzz

  8. #8
    Join Date
    Jun 2004
    Location
    Beauceville, Quebec, Canada
    Posts
    132

    Default Re: Mass Mailer addon

    how do i get this addon to work in 3.0.12

  9. #9
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default Re: Mass Mailer addon

    Quote Originally Posted by mroyusa View Post
    how do i get this addon to work in 3.0.12
    Fix whatever is wrong with it, or contact the author to see if they have an updated version.
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

Similar Threads

  1. Replies: 15
    Last Post: 02-12-2007, 09:38 AM
  2. X-Mailer hijacked for spam
    By ttro in forum General Help (CLOSED)
    Replies: 1
    Last Post: 07-26-2006, 11:02 AM
  3. Mass Mail to Agents
    By raebaca in forum Addon help, ideas and discussion (CLOSED)
    Replies: 2
    Last Post: 09-20-2005, 12:49 AM
  4. Mass field update
    By bluma in forum HELP (CLOSED)
    Replies: 0
    Last Post: 07-03-2004, 01:43 AM
  5. Mass loading of images ?
    By Denver Dave in forum Feature Request (CLOSED)
    Replies: 4
    Last Post: 07-12-2003, 06:56 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
  •