I've wrestled with this too a little, but what I came up with as a solution for me is pretty far removed from the path you are on here.

My hacky solution was simply to edit each user's pref file to set their return email address to their email address w. domain. I have a small enough user base of users using SM that this was feasible. If you need a more automated solution, perhaps you could devise a script to add/edit the return address value in each user's SM prefs?


On Dec 9, 2004, at 10:52 PM, Steve Dudley wrote:

Iam trying to setup a login page so that the domain is auto added to the user name, I have tried a few of the ideas for amending the login.php as posted on the sm site and they do not seem to work, if any one has a completed login.php that works please send it to me at [EMAIL PROTECTED] with what I need to change to get it working.


Also I have tried the following code

<?php

if (eregi("block-Block_Creator.php",$PHP_SELF)) {

Header("Location: index.php");

die();

}

$someVarName = <<<_JSCODE_

<script type="text/javascript">

<!--

function addDomain(element){

var str = element.value;

if(str.search([EMAIL PROTECTED]/)==-1){

element.value = element.value + "@mydomain.com"; } } // --> </script> _JSCODE_; echo $someVarName;

$content = "<form method=\"post\" name=\"logon\" action=\"

<http://www.mydomain.com/mail/src/redirect.php/>


http://www.mydomain.com/mail/src/redirect.php\">


<small>Your Co. Name, ";

$content .= " <BR> Email Login</small><BR> <table border=\"0\"

cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:

collapse\" bordercolor=\"#111111\" width=\"7%\" height=\"19\">"; $content .= " <tr>"; $content .= " <td width=\"100%\" height=\"1\">User ID:</td>"; $content .= " </tr>"; $content .= " <tr>"; $content .= " <td width=\"100%\" height=\"1\"><font color=\"#FF0000\"

size=\"1\">ex. \"fsmith\"</font></td>";

$content .= " </tr>";

$content .= " <tr>";

$content .= " <td width=\"100%\" height=\"22\"> "; $content .= " <input type=\"text\" size=\"16\" maxlength=\"128\"

name=\"login_username\"

onChange=\"javascript:addDomain(this);\"></td>";

$content .= " </tr>";

$content .= " </table>";

$content .= " <p>Password:<BR> <input type=\"password\" size=\"16\"

name=\"secretkey\" maxlength=\"128\"><BR><input

type=\"hidden\" name=\"js_autodetect_results\" value=\"SMPREF_JS_OFF\" /> <input type=\"hidden\" name=\"just_logged_in\"

value=\"1\" /> <input type=\"submit\" value=\"Login\" name=\"do.login\">; $content .= "</form>"; ?>

but get the following error

Parse error: parse error, unexpected '/' in /home/members/public_html/mail/maillogin.php on line 34



any help on this would be great.

Regards

Steve


Reply via email to