ASP.Net 3.5 password recovery SMTP settings

cebnonv

New Member
Within ASP.Net - I'm using the built in password recovery wizard.Is there any way of adding SMTP authentication to the Mail Authentication wizard - without having to add it to the web.config? Or can it be injected somewhere in the code-behind?My aspx code is below - there is currently no code-behind:\[code\] <asp:PasswordRecovery ID="PasswordRecovery1" runat="server" borderStyle="None" borderWidth="1px" Font-Size="10pt" Font-Names="Verdana" onsendingmail="PasswordRecovery1_SendingMail"> <TitleTextStyle BackColor="#6B696B" Font-Bold="True" ForeColor="#FFFFFF" /> <MailDefinition From="[email protected]" Priority="High" Subject="My Domain - new, temporary password" BodyFileName="forgotpassword.txt"> </MailDefinition> <UserNameTemplate> <table border="0" cellpadding="1" cellspacing="0" style="border-collapse:collapse;"> <tr> <td> <table border="0" cellpadding="0"> <tr> <td align="center" colspan="2" style="font-family:Arial;font-size:Small;"> Enter your User Name to receive your password.</td> </tr> <tr> <td align="right" style="font-family:Arial;font-size:Small;"> <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label> </td> <td> <asp:TextBox ID="UserName" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="PasswordRecovery1">*</asp:RequiredFieldValidator> </td> </tr> <tr> <td align="center" colspan="2" style="color:Red;"> <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal> </td> </tr> <tr> <td align="right" colspan="2"> <asp:Button ID="SubmitButton" runat="server" CommandName="Submit" Text="Submit" ValidationGroup="PasswordRecovery1" /> </td> </tr> </table> </td> </tr> </table> </UserNameTemplate></asp:PasswordRecovery>\[/code\]Currently I just get the message:\[quote\] System.Net.Mail.SmtpFailedRecipientException Mailbox unavailable. The server response was: must be authenticated\[/quote\]
 
Back
Top