cancel
Showing results for 
Search instead for 
Did you mean: 

Sending E-mail

itsmanish
Champ in-the-making
Champ in-the-making
Hi,
I want to send E-mail to notify user on adding user to a space, In which xml files I have to make change, I already have a e-mail id(xyz@xyz.com) and server for that.
Please help. Smiley Very Happy
5 REPLIES 5

pascalt
Champ in-the-making
Champ in-the-making
Hi,

As far as i know there is no out-of-the-box user notification on adding a user.
I believe at this time Alfresco only provides the possibility to notificate the user or group being added.

You can ofcourse alter the add user wizard.

You can find wizard examples within the Alfresco SDK and at the WIKI in the developers section.

itsmanish
Champ in-the-making
Champ in-the-making
Pascal, thanks for the reply, thought it didn't helped my cause.

Following alfresco client, when i add new user to the space, i see functionality for email notification. I guess, by default, email notifications are disabled (due to lack of domain etc).

Can anyone throw some light on how to enable email notfication and which files need to be modified for specifying email server details.

For the same, i modified these three files :

1. repository.properties

# Email configuration
mail.host=GSTRS
mail.port=25
mail.username=hds75
mail.password=dkdj@654
# Set this value to UTF-8 or similar for encoding of email messages as required
mail.encoding=UTF-8
# Set this value to 7bit or similar for Asian encoding of email headers as required
mail.header=7bit
mail.from.default=hsg.gtsr@tr.com

2. web-client-config.xml

<!– the from address to use when sending emails from the client –>
<from-email-address>hsg.gtsr@tr.com</from-email-address>

3. web-client-config-custom.xml

   <!– Example of overriding the from email address –>
   <!– –>
   <config>
      <client>
         <from-email-address>hsg.gtsr@tr.com</from-email-address>
         <search-max-results>100</search-max-results>
      </client>
   </config>

Still, email notifications are not working.
Any help in this regard will be highly appreciated.


Regards,
Manish

dbaran
Champ in-the-making
Champ in-the-making
Hello,

To configure our Alfresco instance used here, I followed the wiki page E-mail configuration. Be sure to configure correctly the repository-properties bean's configuration as described in Repository configuration wiki page.

In the E-mail configuration wiki page, a limitation is noted about secure STMP servers. I don't know if this limitation is currently obsolete or not.

Here an example with Tomcat:

File <Tomcat_Home>/shared/classes/alfresco/extension/custom-repository-context.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<!– overriding to point to custom properties –>
    <bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="locations">
            <list>
                <value>classpath:alfresco/repository.properties</value>
                <value>classpath:alfresco/version.properties</value>
                <value>classpath:alfresco/domain/transaction.properties</value>

                <!– Override basic repository properties –>
                <value>classpath:alfresco/extension/custom-repository.properties</value>
            </list>
        </property>
    </bean>

</beans>

File <Tomcat_Home>/shared/classes/alfresco/extension/custom-repository.properties
#
# Email configuration
#
mail.host=mailhost.domain.com
mail.port=25
mail.username=
mail.password=
# Set this value to UTF-8 or similar for encoding of email messages as required
mail.encoding=UTF-8
# Set this value to 7bit or similar for Asian encoding of email headers as required
mail.header=
mail.from.default=alfresco@domain.com

itsmanish
Champ in-the-making
Champ in-the-making
Hi Knowings,

Thanks for the help Knowings,
I tried it with this configuration, I am getting following exception when notifying user :–


12:11:45,266 ERROR [web.bean.TemplateMailHelperBean] Failed to send email to abc.abc@xyz.com
org.springframework.mail.MailSendException: Could not send mails: 454 5.7.3 Client does not have permission to submit mail to this server.

com.sun.mail.smtp.SMTPSendFailedException: 454 5.7.3 Client does not have permission to submit mail to this server.


Please have a look in the issue

regards,
Manish

dbaran
Champ in-the-making
Champ in-the-making
Your SMTP server rejects your mail due to permission problem.
Check your login/password properties in configuration file, or perhaps the note about secure STMP server is not obsolete.