Archive for March, 2008

Integrating RoundCubeMail in your Website

This item was filled under [ PHP ]

To integrate *RoundCubeMail (for auto-login) in your own website, perform these two steps as defined on RoundCube Forum.
Edit your “index.php“..
1. Near line 240, modify the code as shown below:
// not logged in -> show login page
if (empty($USER->ID))
{
rcmail_login($_SESSION["www_user"], $_SESSION["www_pass"], $host);
if ($_task == "login")
header("Location: $RoundCubeDIR");
exit;
}
Here, $_SESSION variables contain value carried forward from your own website.
2. Now, update [...]

Continue reading...

MySQL: Deleting/Identifying duplicate records

This item was filled under [ MySQL ]

A simple way out to delete duplicate entries is to copy DISTINCT values to a temporary table. I tried it over 2 field table with 0.1 million rows and it worked perfectly for me.
CREATE TABLE NewTable …;

INSERT INTO NewTable(field1)
SELECT DISTINCT field1 FROM MyTable;

DROP TABLE MyTable;
Alternately, if you’re populating your database and would like to avoid [...]

Continue reading...

Fixing attachment bug in RoundCubeMail

This item was filled under [ PHP ]

Often Word/Excel files do not appear in email message though the email contains attachment. I faced this issue using RoundCubeMail 0.1-stable. To fix it, simply download the updated version of PEAR MIME package from: http://pear.php.net/get/Mail_Mime
In your /program/lib/Mail/ directory, extract & replace with the new MIME package.
Try sending emails now, it should work properly!
*Actually [...]

Continue reading...

Managing AddressBook globally in RoundCubeMail

This item was filled under [ PHP ]

Setting up RoundCubeMail might require managing Contacts globally specially if you are working in an organization. There might be different tweaks available for this, but I got it done in a very simple manner.
Open up “func.inc” which can be found in: program/steps/addressbook/ directory. On line # 29, you will find:
$CONTACTS = new rcube_contacts($DB, $_SESSION['user_id']);
Modify it [...]

Continue reading...