RT 4.4.1 sendmail problem

Hello,
I am stuck trying to set email notifications when actions like createticket, answer on ticket are triggered.
My current setup and configuration looks like this:

  • ubuntu 16.04, server lts, sendmail 8, rt 4.4.1, apache2, DB mysql

  • rt config
    Set($MailCommand, “sendmailpipe”);
    Set($SendmailArguments,"-oi -t -ODeliveryMode=b -OErrorMode=m");
    Set($SendmailPath, “/opt/rt4/etc/msmtp_wrapper”);
    Set($NotifyActor, 1);

  • rt4 directory with msmtp_wrapper files and /usr/bin/msmtp file have all rights for user www-data

  • log journalctl -xe
    Aug 18 14:22:06 rt RT[616]: [616] Couldn’t load object RT::Transaction #0
    Aug 18 14:22:09 rt RT[630]: [630] <rt-4.4.1-630-1503058929-1799.108-3-0@###> #108/2074 - Scrip 3 On Correspond Notify Owner and AdminCcs
    Aug 18 14:22:10 rt RTmailer[904]: CALL /usr/bin/msmtp -nt -oi -t RETURNED 78
    Aug 18 14:22:10 rt RT[630]: [630] <rt-4.4.1-630-1503058929-1799.108-3-0@###> sent To: ###
    Aug 18 14:22:10 rt RT[630]: [630] <rt-4.4.1-630-1503058929-247.108-4-0@###> #108/2074 - Scrip 4 On Correspond Notify Other Recipients
    Aug 18 14:22:10 rt RT[630]: [630] <rt-4.4.1-630-1503058929-247.108-4-0@###> No recipients found. Not sending.
    Aug 18 14:22:10 rt RT[630]: [630] <rt-4.4.1-630-1503058929-773.108-5-0@###> #108/2074 - Scrip 5 On Correspond Notify Requestors and Ccs
    Aug 18 14:22:10 rt RTmailer[907]: CALL /usr/bin/msmtp -nt -oi -t RETURNED 78
    Aug 18 14:22:10 rt RT[630]: [630] <rt-4.4.1-630-1503058929-773.108-5-0@###> sent To: ###
    Aug 18 14:22:10 rt RT[630]: [630] Couldn’t load object RT::Transaction #0
    Aug 18 14:22:10 rt RT[618]: [618] Couldn’t load object RT::Transaction #0

  • msmtp_wrapper config file
    defaults
    logfile /var/log/msmtp.log
    account default
    host ###.###.###
    port 25
    tls off
    auth on
    user ###
    password ###
    auto_from on

  • msmtp_wrapper
    /usr/bin/msmtp -t -C /opt/rt4/etc/msmtp_wrapper.conf
    /usr/bin/logger -t RTmailer -p syslog.info – CALL /usr/bin/msmtp -nt “$@” RETURNED $?

Please HALP.

RESOLVED: Needed to add ‘maildomain: yourdomainname’ line to msmtp_wrapper.conf