PROBLEM
I want to display a different welcome message for each domain I have
ENVIRONMENT
- On-Premise Server + WebMail Installations: Version 6.0 > Current Version
- Webmail Only Installations: Version 6.0 > Current Version
CAUSE
Domain specific welcome messages are not available
RESOLUTION
You can set custom Welcome Messages for each domain you host in Atmail via this method:
- open up /usr/local/atmail/webmail/application/models/users.php
- find:
$messageBody = self::generateWelcome( $userData , $this ->_globalConfig[ 'welcome_msg' ]); |
- change this to:
$domainRef = $userData [ 'UserSession' ][ 'Account' ]; $domainRef = explode ( "@" , $domainRef ); $welcomeMsg = "/usr/local/atmail/mailserver/etc/$domainRef[1].html" ; if (! file_exists ( $welcomeMsg )) $welcomeMsg = "/usr/local/atmail/mailserver/etc/welcome-message.html" ; $messageBody = self::generateWelcome( $userData , $welcomeMsg ); |
- save changes,
- create copies of the /usr/local/atmail/mailserver/etc/welcome-message.html with the filenames being the domain name you wish to have customized welcome messages for. For example, a domain called juno.com:
% cp /usr/local/atmail/mailserver/etc/welcome-message .html /usr/local/atmail/mailserver/etc/juno .com.html |
This will then provide the appropriate welcome message for each domain.
Comments