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.

I want to webmail login straight to inbox rather than choosing email cilent each time

Discussion in 'E-mail Discussions' started by chrisj, Sep 9, 2004.

  1. chrisj

    chrisj Member

    Joined:
    Sep 9, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Can I webmail login straight to inbox rather than choosing email cilent each time

    Hi - my clients want to login to: http://theiraccount.com/webmail and then on entering user name and password go straight into their inbox (in say neomail) instead of each time being presented with a choice of neomail/horde/squirrel mail.

    Is this possible?

    Thanks...
     
    #1 chrisj, Sep 9, 2004
    Last edited: Sep 9, 2004
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
  3. chrisj

    chrisj Member

    Joined:
    Sep 9, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    from /webmail though?

    Thanks Dalem... anyway to get it automatic from http://domain.com/webmail which is easier for clients to remember?
     
  4. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
  5. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Can't something be done in httpd.conf to get what chrisj wants?
     
  6. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
  7. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    squirrelmail must be set up differently on differnt builds of OS

    PHP:
    http://domain.com:2095/squirrelmail/src/login.php worked for me.
    mine goes to neomail it needs the 3rdparty in it


    I am sure you could write a php or cgi script to redirect to the different mail clients but that wasnot the orig question

    here is a simple java script


    <script type="text/javascript"> function set_target() {

    var username, password, servername, login_option, protacal;
    domain = document.forms.login_form.user.value;


    login_option = document.forms.login_form.login_option.value;

    login_option == '2096' ? protacal = 'https://' : protacal = 'http://'
    ;

    document.forms.login_form.action = protacal + domain + ':' + login_option
    ;

    } </script>

    domain name
    <form name="login_form" method="post" onsubmit="set_target();">
    <table width="154" height="59" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td height="38">
    <p><font color="#ffffff" size="1">DOMAIN
    NAME </font>
    <input style="width: 125px; height: 18px;" name="user" class="input" type="text" value="">
    <br> <select style="width: 125px; height: 18px;" name="login_option" class="input">

    <option value="2096/3rdparty/squirrelmail/src/login.php">squirrelmail</option>
    <option value="2096/neomail/neomail.pl">neomail/</option>
    <option value="2096/horde/index.php">horde Webmail</option></select> <font size="1" color="#ffffff">LOGIN
    TYPE </font> </p></td></tr><tr><td height="21">
    <input type="image" src="/images/login.gif" width="47" height="16"> </form>
     
    #7 dalem, Sep 9, 2004
    Last edited: Dec 7, 2005
  8. asmithjr

    asmithjr Well-Known Member

    Joined:
    Jun 13, 2003
    Messages:
    475
    Likes Received:
    1
    Trophy Points:
    18
    close, wanting to use a form that prompts for user and password then logs directly into squirrel mail. without the 2nd prompt.
     
  9. steventay

    steventay Member

    Joined:
    Sep 24, 2004
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Singapore

    don't understand.

    my webmail always have popup to ask for email address and password

    http://webmail.steventay.com

    how do i make it like http://webmail.100for100.com

    thank.
     
  10. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    you can edit your httpd.conf file to route to the squirrelmail directory instead of the cpanel page. I did it.. search on the forum (older than 30days) for squirrelmail... I asked this a long time ago and remedied it...
     
  11. chrisj

    chrisj Member

    Joined:
    Sep 9, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Solution

    Inspired by your comments, I realised I could simply place the following php redirect message in a page called index.php in a folder called mail. Thereby my client can simply type in www.theirdomain.com/mail enter their username and password and end up straight away in their inbox. Excellent - thanks guys
    Chris

    index.php simply contains:

    <?php
    header("Location: http://domaincom:2095/neomail/");
    exit;
    ?>
     
  12. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    lol.. sure.. that'll work too... just re-re-forwards it...
     
  13. fawcetteng

    fawcetteng Registered

    Joined:
    Jun 28, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    only neomail?

    how come this solution doesnt work for squirrel or horde?
     
  14. ryno267

    ryno267 Well-Known Member

    Joined:
    Mar 3, 2004
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Chandler, AZ
    cPanel Access Level:
    Root Administrator
    well it should in theory - just make sure you use the correct port and dir structure.
     
  15. Oso

    Oso Registered

    Joined:
    Oct 31, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    This is so weird, tell me whats wrong guys, if you will.

    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" x-undefined>
    <title>Mail</title>
    </head>
    
    <body>
    <?php
    header("Location: http://peaches-gaming.com:2095/neomail/"); 
    exit;
    ?>
    
    
    </body>
    
    </html>
    
     
  16. sleddog

    sleddog Active Member

    Joined:
    Jun 13, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Labrador, Canada
    Try removing all the HTML.
     
  17. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    You could setup a subdomain of webmail.domain.com that points to the appropriate url. Lots easier than doing all that php file stuff ;)
     
  18. capoeng2004

    capoeng2004 Member

    Joined:
    Oct 18, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    I'm use your scripts but steel show the pop up login.

     
  19. Kiper

    Kiper Registered

    Joined:
    Mar 6, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Simple login form for Squirrelmail (works for the others as well)

    If you want a login form straight to the squirrelmailbox then try this example derived from cpanels own login script http://www.cpanel.net/cpanel-login.phps (save as a .php-file):

    Code:
    <html>
    <h1>[Web Hosting Company Name Here]</h1>
    
    <b>Webmail Login</b><br>
    
    <?php
    if ($_GET['failed'] == "1") {
    ?>
    <font color=#FF0000>Your login attempt failed!</font>
    <?php
    }
    print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2096/3rdparty/squirrelmail/src/login.php\" method=POST>";
    ?>
    User: <input type=text name=user><br>
    Pass: <input type=password name=pass><br>
    <?php
    print "<input type=hidden name=failurl value=\"http://" .  $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
    ?>
    <input type=submit value=Login>
    </form><br>
    </html>
    I hope you find it useful! There are some security considerations though. The form lets you login to the webmail with the back-button even if you fill in the wrong user/pass. The second is that your user/pass is submitted unencrypted. If you have som better ideas, please submit them to this thread!
     
    #19 Kiper, Aug 10, 2007
    Last edited: Aug 10, 2007
  20. klecehost

    klecehost Registered

    Joined:
    Dec 5, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I want to login direct in squirrelmail too. can you help me? i tried your code, but return pass wrong. Help me please.
     
    #20 klecehost, Dec 5, 2007
    Last edited: Dec 5, 2007
Loading...

Share This Page