Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 13 of 13

This is a discussion on webmail in the Open Discussion & Chit-chat forum
i have aletia v100 hosting and my domain is www.thaduri.com i have a webmail account as well where i can read my mail by going ...

  1. #1
    JPC Member
    Join Date
    Jul 2003
    Posts
    9

    webmail

    i have aletia v100 hosting and my domain is www.thaduri.com

    i have a webmail account as well where i can read my mail by going to www.thaduri.com/webmail

    when i do that a window pops up and asks me for username and pass and i put it in and then it takes me to an option of neomail or horde.

    i was wondering 2 things:

    1. is there a way to set neomail as default so it just goes into newo mail all the time

    and 2:
    is there a way to incorporate the username/ pass into my site itself (www.thaduri.com/)so that i can make form fields and press "logon" or somemthing and it wil take me into neomail... instead of the popup logon by me going to www.thaduri.com/webmail ((there must be a script that does this :-)))

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    The URL to Neomail is http://www.yourdomain.com:2095/neomail/neomail.pl

    There's no way to set that as a default when you go to /webmail, but it would be possible to do the form thing. Here's some quick PHP code that would do it:

    PHP Code:
    <?
        $login 
    $_REQUEST['user'] . ':' $_REQUEST['pass'];
        
    header("Location: http://$login@www.interbrite.com:2095/neomail/neomail.pl");
    ?>
    The general format of the URL above is http:// user : pass @ domain / path. If the server is expecting a username and password and you do not pass it in the URL as in this example, it uses the dialog box to get that info.

    If you use my example code, you'll want to make your form fields named 'user' and 'pass.' Note that you may get a warning from your browser that you are being redirected to a URL that contains a username and password.

    I haven't tested the code, but I think it should work. Let me know if you have a problem with it.

    --Jason
    Last edited by jason; 07-03-2003 at 09:52 AM.
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    JPC Member
    Join Date
    Jul 2003
    Posts
    9
    thanks jason,

    ok i have made a html form which asks for username and pass

    now where do i put that php behind the form? and what should the form action be?

    like, i have gotten help with the front end from a friend, but neither of us are sure about how to make it work!

    thanks in advance!

    EDIT:

    heres the html code...
    <table width="200" border="0" cellspacing="0" style="font-family:verdana;font-size=8pt">
    <tr bgcolor="#186593">
    <td style="font-weight:bold">.webmail.</td>
    </tr>
    <tr bgcolor="#2881B7">
    <td>
    <form action="">
    <table align="center" style="font-family:verdana;font-size=8pt">
    <tr>
    <td align="right">user</td>
    <td align="left"><input type="text" name="user" maxlength="40" size="15"></td>
    </tr>
    <tr>
    <td align="right">pass</td>
    <td align="left"><input type="password" name="pass" maxlength="40" size="15"></td>
    </tr>
    <tr><br>
    <td align="center" colspan="2"><input type="submit" value="login"></td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table>
    and also when i run the php i am getting a "Warning: Cannot modify header information" error.
    Last edited by thaduri; 07-03-2003 at 12:52 PM.

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Put the PHP in a separate file and name it soemthing like "login.php" (the name doesn't matter, as long as it ends in .php). Upload the file to to the same directory as where the file with your form in it is stored.

    In your form, set the action to whatever you used as your PHP file name and the method to "post." You'll aslo need to add name="user" to the form field where the user will enter his or her username and name="pass" to the password field.

    Upload both files (the php file is especially important) in "ASCII" or "Text" mode and then test it out. You shouldn't need to do anything else to get it working.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  5. #5
    JPC Member
    Join Date
    Jul 2003
    Posts
    9
    ok here is my main file:
    <html>
    <table width="200" border="0" cellspacing="0" style="font-family:verdana;font-size=8pt">
    <tr bgcolor="#186593">
    <td style="font-weight:bold">.webmail.</td>
    </tr>
    <tr bgcolor="#2881B7">
    <td>
    <form method="post" action="login.php">
    <table align="center" style="font-family:verdana;font-size=8pt">
    <tr>
    <td align="right">user</td>
    <td align="left"><input name="user" type="text" maxlength="40" size="15"></td>
    </tr>
    <tr>
    <td align="right">pass</td>
    <td align="left"><input name="pass" type="password" maxlength="40" size="15"></td>
    </tr>
    <tr>
    <td align="center" colspan="2"><input type="submit" value="login"></td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table>
    </html>
    and here is my login.php:
    <html>
    <?
    $login = $_REQUEST['user'] . '+thaduri.com:' . $_REQUEST['pass'];
    header("Location: http://$login@www.thaduri.com:2095/neomail/neomail.pl");
    ?>
    </html>
    and i get this when i put my user and pass and press submit

    "Warning: Cannot modify header information - headers already sent by (output started at /home/thaduri/public_html/login.php:2) in /home/thaduri/public_html/login.php on line 4"

    chk it out live at: www.thaduri.com/test.html

    am i doing something wrong? (btw i am using the jaguar pc 'file manager' uploader for uploading my files... is that not ASCII?)
    Last edited by thaduri; 07-03-2003 at 02:28 PM.

  6. #6
    Chairman Still Shady's Avatar
    Join Date
    Sep 2001
    Location
    Redmond, WA-nnabe
    Posts
    1,184
    Remove the < html > and < /html > tag... or move the code below above the html tag!

    <?
    $login = $_REQUEST['user'] . '+thaduri.com:' . $_REQUEST['pass'];
    header("Location: http://$login@www.thaduri.com:2095/neomail/neomail.pl");
    ?>

    You cannot send any header information to the client ones you sent an output already. In that case you send an HTML already but you want to redirect it.

    Http Request Sequence: Send Headers -> Receive Response
    Where do you wanna go today?

  7. #7
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Don't put the <HTML> and </HTML> in the PHP file, as it isn't actually outputting HTML. Its just sending the browser a command, telling it to "go somewhere else." When you add the <HTML> tags before telling this to the broswer, you get an error.

    If you are using the CP to upload your files, you don't need to worry about uploading it as ASCII. The browser figures it out for you. You only need to do this when using FTP.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  8. #8
    JPC Member
    Join Date
    Jul 2003
    Posts
    9
    thanks a lot guys! i know... i am pretty "not adept" ;p.

    ok that problem is solved but there is still a glitch! heh

    now i put in my name and pass in the form
    (http://www.thaduri.com/test.html) and it still pops up the name and pass pop up (from /webmail)
    hmm?

    any thoughts?

    thanks a lot once again! help much appreciated.
    Last edited by thaduri; 07-03-2003 at 09:33 PM.

  9. #9
    JPC Member
    Join Date
    Jul 2003
    Posts
    9
    bump?

    note also that for the username in the php i appended a "+thaduri.com" so that i can just type my username into the form. is that a cause for the problem?
    Last edited by thaduri; 07-15-2003 at 04:12 AM.

  10. #10
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Sorry that I've kind of forgotten about this thread.... code

    Try this code:

    PHP Code:
    <?
        $login 
    urlencode($_REQUEST['user'] . '@thaduri.com') . ':' $_REQUEST['pass'];
        
    header("Location: [url]http://[/url]$login@[url]www.interbrite.com:2095/neomail/neomail.pl[/url]");
    ?>
    In this example I've made PHP encode the entire email address (based on you entering only the username) into a format that won't confuse the browser.

    If this doesn't work, could you maybe create an email account for me and let me try logging in so I can see exactly what's going on? That would be very helpful.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  11. #11
    JPC Member
    Join Date
    Jul 2003
    Posts
    9
    updated code gives me this:

    Parse error: parse error, unexpected T_STRING in /home/thaduri/public_html/login.php on line 3


    and i have created test@thaduri.com with the pass "test"

    thanks for the help!

  12. #12
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Its working fine from Opera and Netscape 7 for me, but not from IE, and I'm not sure why... I'll play with it a bit more...

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  13. #13
    JPC Member
    Join Date
    Jul 2003
    Posts
    9
    thanks a lot jason

    i will also try to ask around and get around the ie problem.

    c ya!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •