Configuration
Email provider
In order to send emails, follow the steps below to configure the email settings in the .env
file.
- Open the
.env
file in the root directory of your Ticksify application using a text editor. - Locate the following lines related to email settings:
MAIL_MAILER=smtp
MAIL_HOST=your_smtp_host
MAIL_PORT=your_smtp_port
MAIL_USERNAME=your_smtp_username
MAIL_PASSWORD=your_smtp_password
MAIL_ENCRYPTION=your_smtp_encryption
MAIL_FROM_ADDRESS=your_email_address
MAIL_FROM_NAME="Your Name" - Replace the placeholders with your specific email configuration details:
- Set MAIL_MAILER to "smtp".
- Set MAIL_HOST to the hostname of your SMTP server.
- Set MAIL_PORT to the port number used by your SMTP server (e.g., 587).
- Set MAIL_USERNAME to your SMTP username or email address.
- Set MAIL_PASSWORD to your SMTP password.
- Set MAIL_ENCRYPTION to the encryption method used by your SMTP server (e.g., "tls" or "ssl").
- Set MAIL_FROM_ADDRESS to the email address you want to use as the "From" address for outgoing emails.
- Set MAIL_FROM_NAME to the name you want to appear as the "From" name for outgoing emails (e.g., "Ticksify Store").
- Save the changes and close the file.
The SMTP server details and credentials can usually be obtained from your email service provider or hosting provider. If you are unsure about the correct values, contact your provider's support team for assistance.
Queues
There are some tasks that take some time to perform during a typical web request such as sending the email notifications. Thankfully, Laravel allows you to easily create queued jobs that may be processed in the background. By moving time-intensive tasks to a queue, our application can respond to web requests with blazing speed and provide a better user experience to your customers.
By default, the queue system is configured with the sync
driver that uses the main thread for the execution of tasks
which is useful only when you are in the development environment. When it's come to the production environment you
should consider some other options to run your queue.
The easiest way to set up a queue connection is to use the database driver which requires less configuration. Just open
your .env
file edit the following variables:
QUEUE_CONNECTION=database
Finally, use queue:work
to start a queue worker and process new jobs as they are pushed onto the queue
php artisan queue:work
To keep the queue:work
process running permanently in the background, you should use a process monitor such
as Supervisor to ensure that the queue worker does not
stop running.
Task Scheduling
Ticksify has some scheduled tasks that run automatically in the background which are Syncing for new products from Envato or Syncing the purchase code from Ticket to check if the customer has extended the support or not ...
So to run those tasks, you need to set up a cronjob by using the following command:
php artisan schedule:run
That's it! You are done.