Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Fresh 1.10 installation - cannot reset passwords for new agents because mails are not sent

I have just installed version 1.10 and trying to add new agents, they are created but are not receiving any mails with set/reset password

When I send mail from scp/emailtest.php it works and I am receiving that mails, but:

When I click "Set password" on a "Manage Agent" page nothing happens.

When I am trying to login with an agent username (or mail), forcing "forgot password" page (because I don't know it and no one does) I am getting "Unable to reset password. Contact your administrator"

There are no records at scp/logs.php

Another observation:
scp/system.php shows red triangle and tell me ""1" is recommended if AJAX is not working" although I do have "cgi_fix_pathinfo=1" uncommented in my php.ini

osTicket is installed under Binami's latest ruby stack, Windows 

I will appreciate any suggestions

Thank you!

Comments

  • You've rewritten osTicket in Ruby? impressive!
  • @Grizly: If you are joking then yes, ha-ha-ha ))))
    If not then just FYI Bitnami's "Ruby stack" includes all components listed as osTicket prerequisites - web server (Apache), MySql and PHP. I installed it because I am planning to have some other applications running under this same server besides osTicket and some of them are implemented with Ruby
  • Hehehe, yeah.

    Seriously though, do you have an smtp server on that box?
    I'm not seeing one in the Dockerfile or any of the docs, so you'll probably need to use external smtp, it's in the osTicket admin settings for your primary email account.
    Odd that the test worked but other email doesn't.
    If nothing in the admin logs, then you'll need to check the webserver logs, but they're generally off by default (change in main.inc.php and php.ini).

    You might also need to enable header spoofing.. not sure, always had postfix myself.
  • edited June 24
    No I don't have smtp on that box. I use our organization office365 mail boxes in all my other web applications. Also with osTicket, when I installed version 1.9 half year ago it worked well.

    In some other thread of this forum I was surprised to see suggestion to test mail with a simple php script, but still followed it. Of course it didn't work because my php.ini doesn't have any correct smtp settings. Is there any chance that osTicket v 1.10 uses that plain php function to send password reset mails instead of configured mail boxes?

    And I turned on all logs that I could find, may be missed some...
  • For those who will face this problem:

    There are by default 3 mail channels in osTicket: support (defaul), Alerts, and 'noreply'.

    Password reset mails are sent via "Alerts" (can this be changed?) and it wasn't configured in my installation, I was sure (but was wrong!) that default configured "support" will be used. After configuring and enabling smpt in 'alerts' channel I got other members of team receiving password reset mails 
  • Good find mate, we should add it to the wiki.
  • still one question remains open: why there wasn't any logs indicating failed attempt to send mail?
  • Well, if your php email configuration accepts local email, then there's no issue from osTicket's end, all worked fine.
    You've likely got a bunch of messages in the local maildrop queue that won't go anywhere because you've no MTA. Maybe you need to tell php where your smtp server is so it can properly error? Or just configure an MTA relay so it can send... How do you get notifications from the server itself? Cron errors and logwatch etc?

    You would think there'd be a log of the event though.
  • Thanks Grizly,
    can you please clarify what MTA stands for?
    and I don't have any notifications from server itself, i probably need to configure it?
  • Sorry, a Mail Transfer Agent, like: sendmail/postfix/exim etc.. something to move mail around via SMTP. 
    PHP assumes you have one, and that it will accept maildrops.. usually this is correct. If you don't (and your stack doesn't come with one), then you need to work around it, usually by connecting to an external MTA, like Office365 or Google etc, but you have to tell php about it. It's in the php.ini smtp settings.
  • Yes I know about those php.ini settings that are needed if plain SendMail() function is used in PHP code.
    I don't have those settings in my php.ini and plain mailsend test fail in my installation of course. But as we can see osTicket uses those internal settings and they work (if provided). I am not familiar very well with what API exactly is used in osTicket code but doesn't it get any errors when sending mail fails?
  • It says it does: https://github.com/osTicket/osTicket/blob/develop/include/class.mailer.php#L569
            $result = $mail->send($to, $headers, $body);
    if(!PEAR::isError($result))
    return $messageId;
    $alert=_S("Unable to email via php mail function")
    .sprintf(":%1\$s\n\n%2\$s\n",
    $to, $result->getMessage());
    $this->logError($alert);
    So it should be in the error log.
  • ok, thanks, so I must have missed this log record somehow...
Sign In or Register to comment.