Roundcube Community Forum

 

Updating configuration in code after loging

Started by plasticgoat, March 31, 2011, 11:04:08 AM

Previous topic - Next topic

plasticgoat

Hi guys,

I'm trying to set, by programming, the smtp_server after the login step.

I can connect with 3 different IMAP accounts to roundcube and each should have a different SMTP server.

I tried to update the config in rcmail.php, in the login function like this :
this->config->set('smtp_server') = "my.smtp.server"
It works but only in the login funtion, once I'm out of the function, the new configuration is lost.

I also tried to do it in "index.php",
It works as I want if I do it at the beginning, after :
$RCMAIL = rcmail::get_instance();
$RCMAIL->config->set('smtp_server') = "my.smtp.server"

In this case, I can see the new smtp_server in the Settings page, but I can't choose it depending on the login address.

And if I move the code line right after the success login, it doesn't work anymore.

I just tried this yesterday, so I probably missed something ;)

If you have any clue on how to do this ...

tieunguyet

Today the company to build a website for a job so important that can not simply say yes or no to it. Website has become the media and the leading business tool for every business, it brings an undeniable advantage. Here are the reasons to start building a website: Website
* Establish business presence on the internet, the opportunity to interact with customers anywhere and at any time. ホームページ製作
* Introduction of products and services in a lively and interactive. ホームページ制作
* Create opportunities to sell goods in a professional manner without costlyホームページ作成
* The opportunity to serve customers better, achieve greater satisfaction from customers. ホームページ作成ソフト
* Create a professional image in public, effective tool to implement marketing and PR campaigns. ホームページセミナー
* The website is simply not a cause of failure of the business. CMS
Your website is not only eye-catching, fast loading, meet customer needs, user-friendly but also friendly to Google, Yahoo, Bing (the popular search engines today) to website is always a high position on search engines this. Web promotion would be simpler if your website is programmed with the search engine-friendly from the beginning. With the development of talented engineers, professionals, OSS will design you a website with everything you need to exploit the strengths of the internet, making the reader interested in learning more about:
* The mission of your company. ビジネスブログ
* Services of your company.
* Help you identify the object.
* Create the form and feel according to your specific needs.
* Making site is always lively and eye-catching access.

JohnDoh

Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

plasticgoat

Thanks !
That's perfect and it works fine :)