I am looking at the Support Ticket menu item in 3.0, Customizations — Open OnDemand 3.0.0 documentation, since I think it’d be useful to provide this option to our users. I have a few questions about that.
First, how is the e-mail being sent? In the documentation, an example of Gmail smtp is provided, but, I would imagine one would need to provide username and password in the config file which is not ideal. In our case, authenticating to OOD (via CAS), the user is also authenticated to our University e-mail, so, I am wondering if we could somehow automatically send that e-mail via this route.
With an initial naive setup in ondemand.yml
which looks like this:
support_ticket:
email:
to: "helpdesk@chpc.utah.edu"
I get an error from OOD after pushing the send button as:
There was an error processing your request: SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate)
Second, I think it’d be good to auto-fill the user’s e-mail address. We have a erb snippet for that in the submit.yml.erb already, which looks like this:
<%-
emailcmd = '/uufs/chpc.utah.edu/sys/bin/CHPCEmailLookup.sh ' + ENV["USER"]
emailaddr = %x[ #{emailcmd}]
-%>
script:
email: <%= emailaddr %>
So, I am wondering if I could do something similar, perhaps in the # /etc/ood/config/apps/dashboard/views/support_ticket/email/_email.text.erb
? Or running the /etc/ood/config/ondemand.d/ondemand.yml through erb first?
Or, even better, knowing the user name, we could form the e-mail based on that (our user names are u0123456
, and the corresponding e-mail is u0123456@umail.utah.edu
).
Thanks,
Martin