Jump to content
Changes to the Jaspersoft community edition download ×
  • How to configure JasperReports Server to send e-mails via Gmail mail account


    akonkin
    • Features: JasperReports Server, Reports Version: v5.5 Product: JasperReports® Server

    In this short article I want to share with you my experiense that I've got when I tried to configure TIBCO JasperReports® Server to sent it's e-mails with reports via https Gmail e-mail account.

    To do this we should edit 2 configuration files:

    in the jasperserver-proWEB-INFjs.quartz.properties file

    report.scheduler.mail.sender.protocol should be set to smtps

    report.scheduler.mail.sender.protocol=smtps

    report.scheduler.mail.sender.port should be set to 465, or 587 if starttls is enabled:

    report.scheduler.mail.sender.port=465

    Below is shown the screenshot from my own configuration (please use your e-mail address and password of gmail account instead of information that is provided on the screenshot)

    js_quartz_properties.png.c478af392b4d42a30ea2aab2de8dc21d.png

    in the jasperserver-proWEB-INFapplicationContext-report-scheduling.xml file

    Configure the auth property as shown, and starttls if required:

    <prop key="mail.smtps.auth">true</prop>

    <bean id="reportSchedulerMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
            <property name="host" value="${report.scheduler.mail.sender.host}"/>
            <property name="username" value="${report.scheduler.mail.sender.username}"/>
            <property name="password" value="${report.scheduler.mail.sender.password}"/>
            <property name="protocol" value="${report.scheduler.mail.sender.protocol}"/>
            <property name="port" value="${report.scheduler.mail.sender.port}"/>
            <property name="javaMailProperties">
                <props>
                    <prop key="mail.smtps.auth">true</prop>
                    <!-- Uncomment below if required -->
                    <!--prop key="mail.smtp.starttls.enable">true</prop-->
                </props>
            </property>
    </bean>
    

    The application server needs be restarted to apply the changes that have been done.

    You might also need to set Allow less secure apps: ON for your Gmail acccount:

    capture_3.jpg.58d069d9f5a94e7c6678bd05aa5c05f7.jpg

    C 2013-12-04 akonkin
    U 2022-08-29 kkumlien

    capture_3.jpg.14529803a7a5fc383ed006e87188f2c4.jpg


    User Feedback

    Recommended Comments

    I do everyting but dont send email.

    js.quartz.properties


    report.scheduler.web.deployment.uri=http://srv_integrador:8080/jasperserver-pro

    report.scheduler.mail.sender.host=smpt.gmail.com

    report.scheduler.mail.sender.username=luXXXXXda@gmail.com.sv

    report.scheduler.mail.sender.password=$XXXXX$

    report.scheduler.mail.sender.from=luXXXXXda@gmail.com.sv

    report.scheduler.mail.sender.protocol=smtps

    report.scheduler.mail.sender.port=465


     

    applicationContext-report-scheduling.xml


       <bean id="reportSchedulerMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">

            <property name="host" value="${report.scheduler.mail.sender.host}"/>

            <property name="username" value="${report.scheduler.mail.sender.username}"/>

            <property name="password" value="${report.scheduler.mail.sender.password}"/>

            <property name="protocol" value="${report.scheduler.mail.sender.protocol}"/>

            <property name="port" value="${report.scheduler.mail.sender.port}"/>

            <property name="javaMailProperties">

                <props>

                    <prop key="mail.smtps.auth">true</prop>

                     <prop key="mail.smtps.starttls.enable">true</prop>

                     

                </props>

            </property>

        </bean>

     

    can you help me please!!

     

    I am using JasperServer cp 7.1.1

    Link to comment
    Share on other sites

    Though this is very old post, but just adding what i found and is related to above post.

    When you use  <prop key="mail.smtps.starttls.enable">true</prop> then you should be using port=587 for gmail.

     

     

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...