The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Pass email to webmail login from the URL

Discussion in 'General Discussion' started by eservices, Apr 25, 2016.

  1. eservices

    eservices Registered

    Joined:
    Oct 22, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi, I am creating a simple page on our CMS that will accept the users email then identify on which of our servers his email server is and then redirect to that servers webmail service.
    Is there any way for me to fill the email on the user edit from the URL? I would like to avoid having the user retype his email a second time.

    Thanks in advance.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. eservices

    eservices Registered

    Joined:
    Oct 22, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. eservices

    eservices Registered

    Joined:
    Oct 22, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    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.
     
    #5 eservices, May 10, 2016
    Last edited by a moderator: May 10, 2016
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page