SMTP Email Setup

eMedia can be configured to SMTP email internal and external users. This functionality is useful when sharing assets, sending notifications or providing links to login or reset passwords.

Create a file named "pluginoverrides10.xml" in the root path /media/emsites/yoursite/webapp/WEB-INF/

<beans>
    <bean id="postMail" class="org.entermediadb.email.PostMail">
        <property name="smtpUsername">
            <value>username</value>
        </property>
        <property name="smtpPassword">
            <value>yourpassword</value>
        </property>
        <property name="smtpServer">
            <value>smtp.yourserver.com</value>
        </property>
        <property name="port">
            <value>587</value>
        </property>
        <property name="smtpSecured">
            <value>true</value>
        </property>
        <property name="sslEnabled">
            <value>true</value>
        </property>
        <property name="enableTls">
            <value>true</value>
        </property>
        <property name="pageManager">
            <ref bean="pageManager" />
        </property>
        <property name="moduleManager">
           <ref bean="moduleManager" />
       </property>
    </bean>
</beans>

Once you are done configuring your email settings, restart the server.

Using Google's SMPT service

To be able to use Google's SMPT service you need to set your settings to:

<beans>
    <bean id="postMail" class="org.entermediadb.email.PostMail">
        <property name="smtpUsername">
            <value>user@domain.com</value>
        </property>
        <property name="smtpPassword">
            <value>GOOGLEAPPPASSWORD</value>
        </property>
        <property name="smtpServer">
			<value>smtp.gmail.com</value>
		</property>
		<property name="port">
			<value>465</value>
		</property>
        <property name="smtpSecured">
            <value>true</value>
        </property>
        <property name="sslEnabled">
            <value>true</value>
        </property>
        <property name="enableTls">
            <value>true</value>
        </property>
        <property name="pageManager">
            <ref bean="pageManager" />
        </property>
        <property name="moduleManager">
           <ref bean="moduleManager" />
       </property>
    </bean>
</beans>

Use a valid Google Workspace email address for smtpUsername and use an Google App Password for the  smtpPassword config.

You can create a new Google App Password here: https://myaccount.google.com/apppasswords. To be able use Google App Password you will neet to enable 2-Step Verification over your account. You can find official documentation in the following link: https://support.google.com/mail/answer/185833?sjid=6362273831366282582-NC.