The mgiAuthenticateDB Tag
SendPassword Mode
Return to the mgiAuthenticateDB
Main Menu
Tag Syntax
The SendPassword mode of mgiAuthenticateDB has a beginning
tag with five required parameters and four optional parameters,
a body with placeholders for the username and password, and an
ending mgiAuthenticateDB tag. The tag form is:
<mgiAuthenticateDB mode="SendPassword" emailAddress="Email"
from="Email" mailServer="SMTP Server" subject="Title"
message="Message with Placeholders"
odbcDatasource="Source Name" odbcUsername="Name"
odbcPassword="Password">
Required Parameters:
- mode - The mode is the function that the mgiAuthenticateDB
tag performs. In "sendPassword" mode, the mgiAuthenticateDB
tag matches the user's email address to a record in the authentication
database and emails the user's username and/or password in a
custom email.
- emailAddress - The user's email address as it is listed
in the authentication database.
- from - The email address listed in the "From"
line of the email.
- mailServer - The name of the SMTP Outgoing mail server
used to send the email (e.g., "mail.domain.com").
- message - The message that contains the username and
password associated with the specified email. The username and
password are automatially entered in the location of the placeholders
(see below).
Optional Parameters:
- subject - The subject of the password email. The default
subject is "Forgot your password?".
- odbcDatasource (NT only) - The odbcDatasource is the name of
datasource on the server that provides access information for
an external ODBC database. If the odbcDatasource parameter is
included, authentication information will be queried from the
specified ODBC database rather than the internal MGI database.
Inquire with the server administrator for additional information
about the use of ODBC databases. If you
include the odbcDatasource parameter, the odbcUsername and odbcPassword
parameters are required.
- odbcUsername (NT only) - The odbcUsername is the username required
to access the ODBC datasource. The odbcUsername
parameter is required if you include the odbcDatasource parameter.
- odbcPassword (NT only) - The odbcPassword is the code required
to access the ODBC datasource. The odbcPassword
parameter is required if you include the odbcDatasource parameter.
Placeholders:
- &mgiAuthenticateDBUsername; - When the password
email is processed by MGI, the username placeholder (&mgiAuthenticateDBUsername;)
is replaced with the specific user's username in the body of
the email.
- &mgiAuthenticateDBPassword; - When the password
email is processed by MGI, the password placeholder (&mgiAuthenticateDBPassword;)
is replaced with the specific user's password in the body of
the email.
Example Usage and Output
<mgiSet name="MessageText">
Dear Subscriber,
Your request for a copy of your username and
password is complete.
Username: &mgiAuthenticateDBUsername;
Password: &mgiAuthenticateDBPassword;
If you did not request this information, please
contact us immediately.
</mgiSet>
<mgiAuthenticateDB mode="sendPassword"
emailAddress={mgiPostArgument name="Email"}
from="registration@domain.com" mailServer="mail.domain.com"
subject="Registration Information"
message={mgiGet name="MessageText"}>
The sendPassword mode of mgiAuthenticateDB allows users to
retrieve their username and password via email. The email entered
by the user must match the email in the authentication database.
In this example, the user's email was entered into a form, posted
to the page containing this mgiAuthenticateDB tag and embedded
in the emailAddress parameter. If the user's username is "bhjohnson"
and the user's password is "pur2sd9", the following
email would be generated:
Dear Subscriber,
Your request for a copy of your username and
password is complete.
Username: bhjohnson
Password: pur2sd9
If you did not request this information, please
contact us immediately.
Return to the mgiAuthenticateDB
Main Menu
|