Announcement

Collapse
No announcement yet.

Mass Mail not Sending mails

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mass Mail not Sending mails

    I want to send Mass emails
    have installed EC v4.8.1 in a AWS EC2 instance.

    In Scheduled Jobs says:


    Note: Add this line to the crontab file to run Espo Scheduled Jobs:
    * * * * * cd /opt/bitnami/apps/espocrm/htdocs; /bitnami/lampstack-linux-x64/output/php/bin/php -f cron.php > /dev/null 2>&1

    Please advise where I have to put the previous line:

    - Check Group Email Accounts / Scheduling
    - Send Mass Emails / Scheduling
    - CRON.PHP thru SSH

    Thanks

    Luis R

  • #2
    Please login via ssh and use this command to add a job for crontab:
    Code:
    sudo crontab -e -u daemon
    Job Offers and Requests

    Comment


    • #3
      Dear Tarasm,
      Thank you very much for the help.

      After typing thru SSH ;

      Code:
      sudo crontab -e -u daemon
      I receive this msg:
      Code:
      The user daemon cannot use this program (cronab)
      The users I have available are : bitnami & root

      I'm wandering if I have to add this line :
      Code:
      [I]* * * * * cd /opt/bitnami/apps/espocrm/htdocs; /bitnami/lampstack-linux-x64/output/php/bin/php -f cron.php > /dev/null 2>&1, [/I]
      a) to crontab / http://bit.ly/2v7LwXc (Image)

      b) To Scheduled Jobs -> Check Group Email Accounts -> Scheduling / http://bit.ly/2v7VYht (Image)

      c) To Scheduled Jobs -> Send Mass Emails -> -> Scheduling / http://bit.ly/2v7W7S3 (Image)

      Thank you

      Luis R
      Last edited by lerg57; 08-24-2017, 03:16 AM.

      Comment


      • #4
        Then try to add for the bitmani user. Steps:
        1. Run the command:
        Code:
        sudo crontab -e -u bitnami
        2. Paste the line:
        Code:
        [I]* * * * * cd /opt/bitnami/apps/espocrm/htdocs; /bitnami/lampstack-linux-x64/output/php/bin/php -f cron.php > /dev/null 2>&1[/I]
        3. Save crontab (for nano editor press Ctrl+O, then Ctrl+X)

        Change your Scheduled Jobs:
        b) Check Group Email Accounts -> Scheduling to
        Code:
        */2 * * * *
        c) Send Mass Emails -> Scheduling to
        Code:
        * * * * *
        Job Offers and Requests

        Comment


        • #5
          Thank you.

          In my installation it does exist this directory:
          Code:
          [I]/opt/bitnami/apps/espocrm/htdocs[/I]

          But does not exist this directory:
          Code:
          [I]/bitnami/lampstack-linux-x64/output/php/bin/php[/I]
          What I suppouse is that this line it is to execute CRON.PHP
          Code:
           
           [I]/bitnami/lampstack-linux-x64/output/php/bin/php -f cron.php > /dev/null 2>&1[/I]
          In my installation the file cron.php
          Exists in this directory
          Code:
          /opt/bitnami/apps/espocrm/htdocs
          So I paste in CRONTAB:

          Code:
          [I]* * * * * cd /opt/bitnami/apps/espocrm/htdocs; [/I]/opt/bitnami/apps/espocrm/htdocs/[I] -f cron.php > /dev/null 2>&1, [/I]
          Please advise if it is correct. However with this change the mass mails are not sent. Thanks for your time.

          Luis R

          Comment


          • #6
            Please correct your line to the following:
            Code:
            * * * * * cd /opt/bitnami/apps/espocrm/htdocs; /bitnami/lampstack-linux-x64/output/php/bin/php -f cron.php > /dev/null 2>&1
            Job Offers and Requests

            Comment


            • #7
              I changed:
              Code:
               
               [I]* * * * * cd /opt/bitnami/apps/espocrm/htdocs; [/I]/opt/bitnami/apps/espocrm/htdocs/[I] -f cron.php > /dev/null 2>&1[/I]
              to:
              Code:
               
               * * * * * cd /opt/bitnami/apps/espocrm/htdocs; /bitnami/lampstack-linux-x64/output/php/bin/php -f cron.php > /dev/null 2>&1
              But did not work.

              This directory does not exit in my installation
              Code:
               
               /bitnami/lampstack-linux-x64/output/php/bin/php -f cron.php > /dev/null 2>&1
              Please see this video where I change the EspoCRM Parameters:



              And here I change the CRONTAB files:

              Root User:



              Bitnami User:


              Thank you

              Luis R

              Comment


              • #8
                The correct crontab line. Please add to crontab under "root" user ("sudo crontab -e -u root").
                Code:
                * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin/php cron.php  > /dev/null 2>&1
                Job Offers and Requests

                Comment


                • #9
                  I wrote both of this:

                  Code:
                  * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin/php cron.php > /dev/null 2>&1
                  And
                  Code:
                  * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/apps/espocrm/htdocs cron.php > /dev/null $

                  Neither worked.

                  In order to understand this previous line, please explain the reason: of this line
                  This part:
                  Code:
                  * * * * * cd /opt/bitnami/apps/espocrm/htdocs;
                  Is for change and get into the directory /opt/bitnami/apps/espocrm/htdocs. Right?

                  And this part:

                  Code:
                  sudo -u daemon /opt/bitnami/php/bin/php cron.php > /dev/null 2>&1
                  Is to execute as daemon the program cron.php so this takes the CRONTAB parameters. Am I Right?

                  Comment


                  • #10
                    Please remove the second line:
                    Code:
                    * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/apps/espocrm/htdocs cron.php > /dev/null
                    Explanation:
                    "* * * * *" - run cron every minute
                    "cd /opt/bitnami/apps/espocrm/htdocs" - get into the directory /opt/bitnami/apps/espocrm/htdocs.
                    "sudo -u daemon /opt/bitnami/php/bin/php cron.php > /dev/null 2>&1" - execute php script as daemon.

                    I have tested the "* * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin/php cron.php > /dev/null 2>&1" line on my VM and it works fine.

                    Please try to run these commands in a terminal via SSH:
                    Code:
                    cd /opt/bitnami/apps/espocrm/htdocs
                    sudo -u daemon /opt/bitnami/php/bin/php cron.php
                    What is the result? Check last execution time of Scheduled Jobs in EspoCRM. Check a log file <espocrm-directory>/data/logs/2017-09-30.log.
                    Do you have this file "/opt/bitnami/php/bin/php"?
                    Job Offers and Requests

                    Comment


                    • #11
                      I type the code

                      Code:
                       cd /opt/bitnami/apps/espocrm/htdocs
                      
                       sudo -u daemon /opt/bitnami/php/bin/php cron.php
                      and these are the results:



                      There is no <espocrm-directory>/data/logs/2017-09-30.log

                      I do not have "/opt/bitnami/php/bin/php"

                      The php file exist here:



                      The file cron.php is located in: /opt/bitnami/apps/espocrm/htdocs/cron.php

                      The logs in Sheduled Jobs are empty

                      Thanks for your support

                      Luis R

                      Comment


                      • #12
                        Regarding to your screenshot you ran this command:
                        Code:
                        sudo -u daemon /opt/bitnami/php/bin/php[B]/php[/B] cron.php
                        Please remove the last "/php". So the command should be:
                        Code:
                        sudo -u daemon /opt/bitnami/php/bin/php cron.php
                        Job Offers and Requests

                        Comment


                        • #13
                          I wrote:
                          Code:
                           
                           sudo -u daemon /opt/bitnami/php/bin/php cron.php
                          Did not work.

                          Maybe is because this directory does not exist : /opt/bitnami/php/bin/php

                          I tried these options:
                          Code:
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u bitnami /opt/bitnami/php/bin cron.php 
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u root /opt/bitnami/php/bin cron.php 
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin cron.php 
                          
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u bitnami /opt/bitnami/php/bin -f cron.php 
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u root /opt/bitnami/php/bin -f cron.php 
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin -f cron.php 
                          
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php cron.php > /dev/null 2>&1 
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u bitnami /opt/bitnami/php cron.php > /dev/null 2>&1
                          * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u root /opt/bitnami/php cron.php > /dev/null 2>&1
                          None of them work.

                          These are the folders where CRON.PHP Is located: http://bit.ly/2gtky2l

                          These are the folders where different BIN´s folders are located: http://bit.ly/2gth0NB

                          These are the folders where different PHP´s folders are located: http://bit.ly/2gtySrA

                          There is no DAEMON user. The users are bitnami & root
                          Does the user daemon in LINUX always exist?

                          I'll appreciate if you explain to my the reason of this line:
                          Code:
                          sudo -u daemon /opt/bitnami/php/bin/php
                          Also in the EspoCRM Application, when you select the time to send the mass mail there are options every 30 min. Will it work if I set to 21:32 instead of 21.30 for example?
                          Please see picture: http://bit.ly/2gtyQ2E

                          I really really appreciate your help and patience with this issue.

                          Thanks

                          Luis R

                          Comment


                          • #14
                            Are these files exist?:
                            Code:
                            /opt/bitnami/php/bin/php
                            Code:
                            /opt/bitnami/apps/espocrm/htdocs/cron.php
                            To check if the user exists:
                            Code:
                            id -u daemon
                            If you get this result "id: ‘daemon’: no such user", the user doesn't exist.

                            If all above information are ok, then do the following steps
                            1. Remove cache directory:
                            Code:
                            sudo rm -rf /opt/bitnami/apps/espocrm/htdocs/data/cache
                            2. Delete all cron definitions from crontab like
                            Code:
                             * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u bitnami /opt/bitnami/php/bin cron.php  * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u root /opt/bitnami/php/bin cron.php  * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin cron.php   * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u bitnami /opt/bitnami/php/bin -f cron.php  * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u root /opt/bitnami/php/bin -f cron.php  * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin -f cron.php   * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php cron.php > /dev/null 2>&1  * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u bitnami /opt/bitnami/php cron.php > /dev/null 2>&1 * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u root /opt/bitnami/php cron.php > /dev/null 2>&1
                            3. Add the line to crontab:
                            Code:
                             * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin/php cron.php  > /dev/null 2>&1
                            Job Offers and Requests

                            Comment


                            • #15
                              Originally posted by lerg57 View Post
                              I wrote:
                              I'll appreciate if you explain to my the reason of this line:
                              Code:
                              sudo -u daemon /opt/bitnami/php/bin/php
                              The server runs under "daemon" user and "daemon" are also owner of files. Cron tab for the user "daemon" is diabled, so we have to add this command under "root" user.

                              Job Offers and Requests

                              Comment

                              Working...
                              X