Skip to content
Christian edited this page Apr 29, 2024 · 6 revisions
# Create queue directory
mkdir ~/.msmtpq && chmod 0700 ~/.msmtpq

# Show help message
msmtp-queue -h

## Create example config file
#./msmtp-queue -e > ~/.msmtpq.conf

# Enqueue test mail
echo -e 'To: [email protected]\nFrom: [email protected]\nSubject: Test\n\nHello world!' | msmtp-yaqi -t -i

# View mail queue
msmtp-queue

# Run mail queue
msmtp-queue -f

Run queue

There are two ways to run the queue.

Daemon mode

Starting with v0.2.0 there's a new daemon mode.

# crontab -e
@reboot /usr/bin/msmtp-yaqi --daemon

Cronjob

Alternatively use a regular cronjob.

# crontab -e
* * * * * /usr/bin/msmtp-yaqi --q-mgmt -r

PHP configuration

; php.ini
sendmail_path = /usr/bin/msmtp-yaqi -t -i
; php-fpm/pool.conf
php_value[sendmail_path] = /usr/bin/msmtp-yaqi -t -i
Clone this wiki locally