Skip to main content

Pass email to webmail login from the URL

Comments

5 comments

  • cPanelMichael
    Hello :) Could you provide a specific example of how this would work? For instance, could you simply enable proxy subdomains and direct the user to "webmail.theirdomain.tld"? Thank you.
    0
  • eservices
    Hi, what I am doing now is the following: User adds his email to a form (over https) then he submits the form (go to webmail button), then I take the host part, do a DNS_A lookup and then DNS_NS lookup and finally a DNS_MX to see if the host is been served from us, then to see if the customer is using our own server for email. The final part is to redirect them to their webmail page. And this is why I need to pass the email over to the webmail login (2096). I was thinking of completing the form using the form element ie https://domain.tld:2096/id?=email, is there any way of using that? I need to do all that so that I can redirect the user to his actual webmail, we have users that use gapps and 365 for email for example. Edit: The whole process if over https, we enforce SSL on all of our services, we also use HSTS so its always the same domain.tld only the host part changes.
    0
  • cPanelMichael
    Hello, Would the "Secure Remote Logins" functionality work as a suitable alternative in this case? It's documented at: Guide to API Authentication - Software Development Kit - cPanel Documentation This subroutine returns a URL for remote logins to cPanel, WHM, or Webmail. Thank you.
    0
  • eservices
    This is not the issue, I already can find the correct server for cpanel, office365 and google apps. My issue is with sending the user to the services login page and autocompleting the email in the email field. I can do it in o365 and gapps but I cant in cpanel. I also dont want to authorise the user in the service, I just want to prefill the email address he provided in my tool. Nothing else. Regards Just to note that I can see that the login form is using a post so just passing the variable in the url will not work, I am asking if there is any function that is included that would allow me to do that.
    0
  • cPanelMichael
    I'm not aware of any cPanel/WHM feature that will automatically populate the email address in the field. There are API calls that will return an email address as part of the result, but automatically populating the email address in a form in the browser is something you may need to develop as a custom script. Thank you.
    0

Please sign in to leave a comment.