Author Topic: Need to send emails through multiple servers using RoundCube  (Read 5107 times)

Offline MarilynnVandiver

  • Newbie
  • *
  • Posts: 2
Need to send emails through multiple servers using RoundCube
« on: November 08, 2016, 10:36:02 PM »
I am using the latest version of round cube and using it with hmail server. It is a shared server (I only have 1 site with different subdomains) and Round cube is connected with IIS. The connection between webmail and domain is accessed by mail.abc.def and the ABC is the domain name, I am trying to host.

All the domains point to only one website on the IIS using bindings from IIS's website settings. Using IIS, I am directing all the subdomains to 1 site. I am using bindings, which are available as website settings in IIS property attributes.

For the config php file for Roundcube, I am doing the following:

Code: [Select]
$config['default_host'] = array('Floridaserver', 'Texasserver', 'newyorkserver', 'Californiaserver',......,.....);
This makes sure, I've multiple servers, while trying to do the login and here is the screen shot for that:



From the above list, the server name at the top will be selected as the default. So, that if someone tries to do the login using any server, it should be able to log in easily using authorized credentials.

Now, the actual issue starts, I don't know how to implement the requirements. Either I have to use Javascript or PHP or simple HTML or there is a code available online or as an official documentation from Round cube to achieve the task.

Here is the html, I am able to find (so far). But I can't see any other details than this:

Code: [Select]
<roundcube:form name="form" method="post">
<roundcube:object name="serverdetails" form="form" size="80" submit=true />
</form>
It is the login.php form. You can clearly see all the login credentials are generated from <roundcube:object name="serverdetails" form="form" size="80" submit=true />, and I am having username, password and server from this list. But, I don't know, what to do to modify this object?

My client has one website. He has clearly mentioned that he want different servers while emailing different locations. Like, if the base is located in the Florida, the mail will be sent through the Floridian server. As an example, http://militarybases.co/directory/camp-blanding-joint-training-center-in-starke-fl/ is a page, which will have the email button (right next to the article) and on clicking it will have stored the email in the cache of station chief of the camp blanding joint training center of Starke Florida and Florida server of the site will be used.

Offline rm13

  • Full Member
  • ***
  • Posts: 129
Re: Need to send emails through multiple servers using RoundCube
« Reply #1 on: November 11, 2016, 03:20:33 PM »
So you want to set the SMTP server differently depending on what IMAP server name the user has logged into?

Did you try the replacement variables? See config/defaults.inc.php at the SMTP section.

 https://github.com/roundcube/roundcubemail/blob/master/config/defaults.inc.php#L237