2013-12-19

[OrangeHRM v3.0.1] How to change email notification sender name

This mod will enable you to change the email sender name from OrangeHRM to whatever you like.

It is already possible to change the email address by logging in as an Admin then:
  • Go to: Admin > Configuration > Email Configuration (/symfony/web/index.php/admin/listMailConfiguration)
  • Click on Edit, now enter any email address in the Mail Sent As field
  • Now notifications sent by the system appear as OrangeHRM [your_email@address.com]
To change the OrangeHRM sender name, edit the EmailService.php file, path:
 \symfony\apps\orangehrm\lib\model\core\Service\EmailService.php
Line no.
195     $this->messageFrom = array($this->emailConfig->getSentAs() => 'OrangeHRM');
466     $message->setFrom(array($this->emailConfig->getSentAs() => 'OrangeHRM'));

Change OrangeHRM to whatever you want.

Save the changes, restart Apache, test an email and the new name should appear with emails.

9 comments:

  1. Fantastic . Thanks

    ReplyDelete
  2. Hi

    Thanks
    It would be very helpful if you can guide us to change the email Notification text body for Leave Notification email.

    ReplyDelete
    Replies
    1. Hi.. you can edit the email messages in following directory on server:

      public_html/orangehrm/symfony/plugins/orangehrmLeavePlugin/modules/leave/templates/mail/en_US

      Delete
  3. I have installed OrangeHrm 3.3.3 on Ubuntu 14.04 Server and now trying to configure SMTP Email.

    The credentials and settings are correct. I am using same in SuiteCRM installed on CentOS 7.

    The message I get

    Settings Saved. Test email not sent.

    I remember doing this on CentOS:

    chcon -R -t httpd_sys_content_rw_t /var/www/html
    setsebool httpd_can_network_connect=on
    setsebool httpd_can_sendmail=on
    setsebool httpd_unified=on
    Is there some similar settings for Apache on Ubuntu where I can allow sendmail on the server?

    I would highly appreciate your input.

    Thanks in advance.

    ReplyDelete
    Replies
    1. Strange! This should work. Which SMTP settings did you use? If you are trying to use TLS try SSL instead. It should work.

      Delete
  4. Tanmay Kumar1/31/2018 1:36 pm

    Thanks a Ton

    ReplyDelete
  5. Hey RimA, really great thoughts on this topic, I recently blogged about this as well Drupal 8 SMTP Mail

    ReplyDelete