Nice approach! Rather than having all config parameters (smpt_server, smtp_port, smtp_user, smtp_pass) as an array, I suggest to use URLs in $rcmail_config['smtp_server'].
Example: $rcmail_config['smtp_server'] = array( 'imap.host1.tld' => smtp.host1.tld', 'imap.host2.tld' => 'smtp://user:pass@smtp.host2.tld', 'imap.host3.tld' => 'ssl://%u:%p@smtp.host3.tld:465/CRAM-MD5', );
(with 'smtp_auth_type' as folder name)
in rcube_smtp.inc simply use parse_url() to get the host-specific settings, of course with a fallback on the "old" parameters. With this solution we can get rid of four config properties.
Just my 2 cents.
~Thomas
2007/6/14, Eric Stadtherr estadtherr@gmail.com:
Brett,
This is a great idea, for which I've already had use! I did a couple fixes and enhancements to your patch (it now does smtp-server-specific usernames and passwords if desired). Check it out and let me know if it's good. If so, I'll commit it.