Hi Imar,
Thanks for your advice.
1. If I add my username and password like follows, I have follwing error messages.
<mailSettings>
<smtp deliveryMethod="Network">
<network host="smtp.gmail.com" userName="hyungdoo" password="mypassword" port="25" />
</smtp>
</mailSettings>
Server Error in '/Modification' Application.
--------------------------------------------------------------------------------
A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): A from e-mail address must be specified in the From property or the system.net/mailSettings/smtp config section.]
System.Web.UI.WebControls.MailDefinition.CreateMai lMessage(String recipients, IDictionary replacements, String body, Control owner) +1411614
System.Web.UI.WebControls.LoginUtil.CreateMailMess age(String email, String userName, String password, MailDefinition mailDefinition, String defaultBody, Control owner) +183
System.Web.UI.WebControls.LoginUtil.SendPasswordMa il(String email, String userName, String password, MailDefinition mailDefinition, String defaultSubject, String defaultBody, OnSendingMailDelegate onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate, Control owner) +341
System.Web.UI.WebControls.PasswordRecovery.Attempt SendPasswordQuestionView() +653
System.Web.UI.WebControls.PasswordRecovery.Attempt SendPassword() +66
System.Web.UI.WebControls.PasswordRecovery.OnBubbl eEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746
2. If I change it like this:
<mailSettings>
<smtp from="
[email protected]">
<network host="smtp.gmail.com" userName="hyungdoo" password="my password" port="25" />
</smtp>
</mailSettings>
Then I have follwoing messages:
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first u2sm991187pyb
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first u2sm991187pyb
3. If I change it like this:
<mailSettings>
<smtp from="
[email protected]">
<network host="smtp.myhostingname.net" userName="myusername" password="mypassword" port="25" />
</smtp>
</mailSettings>
Then I have two kinds of results:
1) If the username's email address is in this hosting site, it's good to send out.
2) If the username 's email address is not in this hosting site, it's not. The error message from here is:
Mailbox unavailable. The server response was: <
[email protected]> No such user here
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: <
[email protected]> No such user here
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
I hope these several status will be helpful to you.
Thanks,
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1378; ASP.NET Version:2.0.50727.1378