Change the FROM email on outgoing emails.
-
I installed osTicket yesterday, and man! I had never expected it to be packed with so many features looking its design. I was trying to change the
sender
email fromsupport.app@domain
tosupport@domain
by dropping the.app
which is automatically added during app set up. On the osTicket panel, I could not find the password for the mailbox usersupport.app
so I could not change the email.I looked at the Cloudron docs, where I discovered the adimin guide which tells me the email address is configured automatically by Cloudron. I changed the email on Cloudron dashboard to
support@domain
and restarted osTicket, but the change was not reflected.I made the change, but I was instead locked out of osTicket login portal because 2FA email was not being sent.
Mailer Error: Unable to email via php mail function ... mail() returned failure
. Changing the email back tosupport.app@domain
on Cloudron and restarting osTicket solved it.
The email address set on the Cloudron dashboard for osTicket is probably not synced to osTicket. I would love to have
support@domain
as a sender email, so kindly suggest me the right way. I ended up writing this long post after trying everything I could; but might have missed the obvious?
Logs from the app, as shown on the Cloudron dashboard:
Dec 23 18:25:33 PHP Fatal error: Uncaught Error: Call to undefined function _S() in /app/code/upload/include/class.mailer.php:612 Dec 23 18:25:33 Stack trace: Dec 23 18:25:33 #0 /app/code/upload/include/class.mailer.php(632): Mailer->send(Array, 'osTicket Fatal ...', 'Unable to conne...', Array) Dec 23 18:25:33 #1 /app/code/upload/bootstrap.php(316): Mailer::sendmail('admin@server.lo...', 'osTicket Fatal ...', 'Unable to conne...', '"osTicket Alert...') Dec 23 18:25:33 #2 /app/code/upload/bootstrap.php(201): Bootstrap::croak('Unable to conne...') Dec 23 18:25:33 #3 /app/code/upload/main.inc.php(28): Bootstrap::connect() Dec 23 18:25:33 #4 /app/code/upload/api/api.inc.php(26): require_once('/app/code/uploa...') Dec 23 18:25:33 #5 /app/code/upload/api/cron.php(17): require('/app/code/uploa...') Dec 23 18:25:33 #6 {main} Dec 23 18:25:33 thrown in /app/code/upload/include/class.mailer.php on line 612
Note: I have changed the admin email from
admin@server.local
to an actual email, regardless of what the log message says. -
Hm I think you are not supposed to change these values if you want to use cloudrons mailer addon. They are set by environment variables during app startup --> https://git.cloudron.io/cloudron/osticket-app/-/blob/master/start.sh#L66.
Cloudron uses sendmail and the error indicates that PHP mail is used Maybe you messed up by editing the SMTP settings by hand? Did you restart the app after changing the mail FROM address?
btw. why do you have 2FA? Plugin?
-
@subven The docs say we should not change this settings in this particular app. But the FROM address would be changed in all other apps if the email is configured on the app's settings on the Cloudron dashboard. In my case the email change was not honored by osTicket. I'm not entirely sure what went wrong.
I didn't make any changes to the SMTP server. I restarted the app every time I made any changes. I enabled 2FA (not a plugin, but built-in feature of osTicket) because that's the obvious thing to do for an admin account.
-
@girish These issues with email being hijacked by Cloudron could all be solved by allowing a checkbox for each app not to touch the app's email configuration. I.e. email could be configured in the app. Our livelihood was threatened by Cloudron InvoiceNinja overriding our SMTP settings on every restart. This really should be fixed.