Here is a real basic example of how to create Imail accounts from an asp
page for a free mail type situation. The ASPExec package is a free package
that you can locate on Microsoft's site I believe. You don't have to worry
about some one selecting a username that already exists because if they do
the Execute method will not return OK and you simply resond saying that an
error occurred or the username already exists so try again.
<%@ Language=VBScript %>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 3.0">
<title></title>
</head>
<body>
<%
On Error Resume Next
Dim uname
Dim ename
Dim epass
Dim ckSpace
Dim strParam
Function quoteCK(inVar)
IF NOT IsNull(inVar) THEN
quoteCK = replace(inVar,"'","''")
END IF
End Function
uname = trim(quoteCK(request.form("uname")))
uname = replace(uname," ","_")
ename = trim(quoteCK(request.form("ename")))
ename = replace(ename," ","_")
epass = trim(quoteCK(request.form("epass")))
ckSpace = inStr(epass," ")
If ckSpace >= 1 Then %>
<script language="Javascript">
alert("Error adding your account! You cannot have spaces in your
password.\n" + "Please try again.")
location.href=history.back()
</script>
<%
Response.end
End If
strParam="-h ibexwebmail.com -u " & ename & " -n '" & uname & "' -p " &
epass
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "d:\imail\adduser.exe"
Executor.Parameters = strParam
strResult = Executor.ExecuteDosApp
strResult = Left(strResult,2)
If strResult = "OK" Then %>
<script language="Javascript">
alert("Account was successfully added!")
location.href="http://www.ibexwebmail.com/maillogin.htm"
</script>
<% Response.End
Else %>
<script
language="Javascript">
alert("Error adding your account! Please try again.")
location.href=history.back()
</script>
<% End If %>
</body>
</html>
Thank you,
Jeff Madison
Chief Technology Officer
SISNA, Inc
(801)924-0900 x 101
http://www.sisna.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of ajay gullapalli
Sent: Thursday, July 01, 1999 10:17 PM
To: [EMAIL PROTECTED]
Subject: RE: [IMail Forum]
Hi Jeff,
Could you send me the example as well? I am trying to do the same. The
web server and imail server will be on the same machine.
Thank you
Regards,
Ajay
--- Jeff Madison <[EMAIL PROTECTED]> wrote:
> If you are running the web server on the same system
> as the Imail server
> this is very easy to do and I can send you an
> example. If the web server is
> on a separate system you have to start messing with
> DCOM or java RMI which
> we have done but it's not pretty.
>
> Jeff Madison
> Chief Technology Officer
> SISNA, Inc
> (801)924-0900 x 101
> http://www.sisna.com
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On
> Behalf Of Y S Kim
> Sent: Thursday, July 01, 1999 6:07 PM
> To: [EMAIL PROTECTED]
> Subject: [IMail Forum]
>
>
> I'd like to know whether I can manage Imail server
> to create new account and get the existing
> account information by asp(MS Active Server Page)
> program as a cgi of the web server.
> If it is possible, could anybody please let me know
> how to do it ?
>
> Product: IMail Server 4.06
> OS: Windows NT Server 4.0
>
> Best Regards,
>
> Y S Kim
> K & C Consulting, Inc.
> E-Mail : [EMAIL PROTECTED]
> Please visit
> http://www.ipswitch.com/support/mailing-lists.html
> to be removed from this list.
>
> Please visit
> http://www.ipswitch.com/support/mailing-lists.html
> to be removed from this list.
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.