Important settings for the app

Few important settings are needed to run the app. Without these settings app can't do some process.

Delivery settings

Delivery settings is one of the most important settings for the app. Delivery settings mean which settings your app will use to send mail. Most of the mail in app are user invitation mail, password reset mail, Notification mail.

You can setup mail from here: Settings > App Settings > Delivery

App delivery settings will mostly use for user invitation and password reset mail. Also if you choose mail notification channel from notification settings then this will also use for sending notification mail. You can find this settings from App panel navigation menu.

You have four option to set up delivery settings

1. Mailgun

To set up Mailgun you will need a Domain name ( Here is how you can add domain in mailgun), API key, From name, From email.

SMTP

2. Amazon SES

Amazon SES needed Api Region, Access Key ID, Secret Access key, From name and From email to set up.

You also have to verify the email address which you are using as from email.

SMTP

3. SMTP

SMTP needed hostname, port, encryption, username, password, From name and From email to set up.

SMTP

For Gmail SMTP email service: You have to enable 2-Step Verification (ON) and create App passwords from your Google account Security.



Click on your Google profile image (Right top side) > Click Manage your google account > Click Security (left side) menu > Scroll down and enable "2-Step Verification" from Signing in to Google section.

After enable 2-Step Verification, you will get an option “App password” > Go to there > Click Select App > Choose Other > Type any name > click Generate > Password will generate.

From name: Billar Test
User name: demo@gmail.com
From email: demo@gmail.com
host: smtp.gmail.com
Port: 587 (Encryption type: TLS)
Port: 465(Encryption type: SSL)
Password: Generated app password

Google Workspace or Google Cloud Identity users:

For Gmail sender email: You have to enable "Less secure app access" from your Google account security settings.

Click on your Google profile image (Right top side) > Manager your google account > Security (left side) menu > Scroll down and goto "Less secure app access" section > click "Turn on access" > do "Allow less secure apps: ON"



4. Sendmail

Sendmail needed path(optional), from name and from email to set up.

SMTP

Set up Cron Job

Cron Job is a process that is executed by your hosted server, in the background.

Cron jobs are used for very important tasks such as:

  • User invitation
  • Sending emails
  • Due invoice reminder
  • Recurring invoice
  • And much more……
Note(Due invoice reminder): Clients will receive an invoice reminder email from the application which starts seven days before the due date. Each day client will receive a reminder email for those last 7 days. Until the remaining due amount is paid off.
How to setup Cron Job:

We provide you with a command inside the Application setting. You will need to add this command inside your web hosting providers control panel.

If you are using shared hosting from the hosting service provider and have a Cpanel/Control panel. Service Provider: Bluehost, DreamHost, Namecheap, HostGator

NOTE: Sometimes PHP path may specify to your different web host. If your cron command isn't run, please contact your Hosting Provider about the exact PHP path.

Cpanel:

Add Cron Job to run scheduler:
  • Search for the Cron Job in your cPanel.
  • Click and go into the setup page for your Cron job.
  • Select “Once per minute” from Common Settings.



  • Run this command in to the “Command:” field
  • /path/to/php /path-to-your-project/src/artisan schedule:run >> /dev/null 2>&1

    Example:
    Root domain:

    /usr/local/bin/php /home/billar/public_html/src/artisan schedule:run >> /dev/null 2>&1

    Subdomain: [If subdomain directory is inside of public_html folder]

    /usr/local/bin/php /home/billar/public_html/folder_name/src/artisan schedule:run >> /dev/null 2>&1

    If subdomain directory is outside of public_html folder:

    /usr/local/bin/php /home/billar/folder_name/src/artisan schedule:run >> /dev/null 2>&1

    Subfolder:

    /usr/local/bin/php /home/billar/public_html/folder_name/src/artisan schedule:run >> /dev/null 2>&1


If you find any problem in running jobs please check your php.ini/php extension configuration.
Make sure there are no function that are called by the queue driver, such as, proc_open, pcntl_alarm, pcntl_async_signals, pcntl_signal in the disable_functions.
If there any you’ll need to remove/enable those functions. Or you can contact with your hosting service provider.

Control Web Panel(CWP):

Hostinger hPanel:

Go to Cron jobs > select “Type: Custom” > Paste the provided command from the application settings without ( >> /dev/null 2>&1) these special characters. hPanel does not support special char in this server.

Command: /usr/local/bin/php /home/billar/public_html/billar/src/artisan schedule:run

DirectAdmin:

Remove the php path which we have provided, and paste the rest of the command.

Command: php /home/billar/public_html/billar/src/artisan schedule:run >> /dev/null 2>&1

Plesk:

Go to Websites & Domains > Scheduled Tasks > Schedule a Task > Select “Task type: Run a PHP script” > Paste “Script path” [project_path] > Arguments schedule:run > Select PHP version [8.0.xx] > Run: select Cron Style & input (*****) > save and run.

project_path: /var/www/xxx/xxxxx.plesk.page/httpdocs/billar/src/artisan with arguments schedule:run

Dream host:

Go to More > Cron jobs > select “Type: Custom” > Paste the provided command from the application settings without ( >> /dev/null 2>&1) these special characters. hPanel does not support special char in this server.

Command: /usr/local/php81/bin/php /home/dh_xyz/xyz.com/src/artisan schedule:run >> /dev/null 2>&1

Documentation: https://help.dreamhost.com/hc/en-us/articles/215088668-Create-a-cron-job

VPS Server:

If you run the application in VPS server, then configure Supervisor to manage the Laravel queue. Otherwise Cron job doesn’t work. Please follow your service provider documentation to run Supervisor and Cron jobs.