anyway i was trying to use gmail as my smtp service on the server configuration. i need it to retrieve the password in case a user forgets his password.
problem is im getting this error:
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. 23sm155884pxi.5
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. 23sm155884pxi.5
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 have no clue how to fix this error. please help! thanks in advance.
Kirtan PatelPosted Dec 4, 2009, 1:34 PM
and In Code you have to Write Like Below to send mail;
using System.Net.Mail;
protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
SmtpClient client = new SmtpClient();
client.EnableSsl = true;
client.Send(e.Message);
}
Mark UyPosted Dec 4, 2009, 7:33 PM
how do i modify the codes now that i am using the global.asax? heres what i come up with.
i want a datareader to check the date on a table and compare it to the current date today. now if it has rows that matches. i want to send an email to notify an email address that a unit needs servicing.
anybody else who can help as well?
Mark UyPosted Dec 4, 2009, 2:02 PM
Kirtan PatelPosted Dec 4, 2009, 1:59 PM
Mark UyPosted Dec 4, 2009, 1:51 PM
alright.
i have another. i want my website to automatically send an email once it reaches a specific date. it doesnt need to be a part of a webform or webpage.
what should i do??
Kirtan PatelPosted Dec 4, 2009, 1:51 PM
Mark UyPosted Dec 4, 2009, 1:48 PM
this is on the password recovery control.
is this the correct event to put the code you wrote?
protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
}
Mark UyPosted Dec 4, 2009, 1:08 PM
the smtp settings inside the website administration tools asks only these options:
Choose this option if your e-mail server requires you to explicitly pass a user name and password when sending an e-mail message.
Choose this option if your e-mail server is on a local area network and you connect to it using windows credentials.
so i have no idea how to add a new set of code in there.
Hiren SoniPosted Dec 4, 2009, 1:03 PM
Hiren SoniPosted Dec 4, 2009, 1:03 PM
Mark UyPosted Dec 4, 2009, 1:00 PM
Hiren SoniPosted Dec 4, 2009, 12:55 PM