Mass Mail not Sending mails

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • lerg57
    replied
    Dear Tarasm,
    It finally worked sending mass mail!!!
    There was a mistake in the cron.php file that is located in /opt/bitnami/apps/espocrm/htdocs.

    It was missing this PHP instruction:
    Code:
    "?>"
    I really really appreciate your help and your patience.

    Without your help I would have not resolved it.

    Thank you!!!

    Best regards

    Luis R
    Mexico

    Leave a comment:


  • tarasm
    replied
    This folder does not exist:
    Code:
    /opt/bitnami/php/bin/php
    It should be a file, not folder.
    Code:
    /opt/bitnami/php/bin - folder
    php - file inside this folder
    Did you try to remove cache folder and run cron with this command:
    Code:
     * * * * * cd /opt/bitnami/apps/espocrm/htdocs; sudo -u daemon /opt/bitnami/php/bin/php cron.php  > /dev/null 2>&1

    Leave a comment:


  • lerg57
    replied
    This folder does not exist:
    Code:
    /opt/bitnami/php/bin/php
    This file does exist:
    Code:
    /opt/bitnami/apps/espocrm/htdocs/cron.php
    This is what it contains: http://bit.ly/2iXwCxk


    This
    Code:
    id -u daemon
    Displays:

    Code:
    1
    Here is the image for daemon, bitnami and root users: http://bit.ly/2iWt6TM


    Leave a comment:


  • tarasm
    replied
    Originally posted by lerg57
    I wrote:
    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
    If you set to 21:32, it will run at 22:00.

    Leave a comment:


  • tarasm
    replied
    Originally posted by lerg57
    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.

    Leave a comment:


  • tarasm
    replied
    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

    Leave a comment:


  • lerg57
    replied
    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

    Leave a comment:


  • tarasm
    replied
    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

    Leave a comment:


  • lerg57
    replied
    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

    Leave a comment:


  • tarasm
    replied
    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"?

    Leave a comment:


  • lerg57
    replied
    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?

    Leave a comment:


  • tarasm
    replied
    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

    Leave a comment:


  • lerg57
    replied
    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

    Leave a comment:


  • tarasm
    replied
    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

    Leave a comment:


  • lerg57
    replied
    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

    Leave a comment:

Working...