Author Topic: Updating configuration in code after loging  (Read 3415 times)

Offline plasticgoat

  • Newbie
  • *
  • Posts: 2
Updating configuration in code after loging
« on: March 31, 2011, 11:04:08 AM »
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 :
Code: [Select]
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 :
Code: [Select]
$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

  • Guest
DS
« Reply #1 on: April 01, 2011, 05:33:52 AM »
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.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Updating configuration in code after loging
« Reply #2 on: April 02, 2011, 03:14:44 AM »
may be something like this could help Roundcube Dynamic Configuration
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline plasticgoat

  • Newbie
  • *
  • Posts: 2
Updating configuration in code after loging
« Reply #3 on: April 04, 2011, 11:43:13 AM »
Thanks !
That's perfect and it works fine :)