|
vinci007 wrote: "The server rejected one or more recipient addresses. The server response was: 501 5.5.4 Invalid Address"
The error clearly says that the address you are providing is wrong.
Where is your code for sending mail ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
ok..I have taken one textbox in the form ..Coding is:
protected void btnSubmit_Click(object sender, EventArgs e)
{
string qry = "Server=.\\sqlexpress; Initial Catalog=dbLogin; Integrated Security=true";
SqlDataAdapter adp = new SqlDataAdapter("Select Email,(select password from tbLogin where UserName = 'Rahul') as password FROM Details WHERE UserName= 'Rahul'", qry);
DataSet ds = new DataSet();
adp.Fill(ds);
string mailQry = ds.Tables[0].Rows[0]["Email"].ToString();
string pwdQry = ds.Tables[0].Rows[0]["password"].ToString();
MailMessage mailObj = new MailMessage();
mailObj.To = "'" + mailQry + "'";
mailObj.From = "hradmin@ionsoftnet.com";
mailObj.Subject = "Your Password";
mailObj.Body = "'" + pwdQry + "' ";
SmtpMail.SmtpServer = "mail.ionsoftnet.com";
SmtpMail.Send(mailObj);
}
Note: My server address is absolutely right .
what could be the other problem?
|
|
|
|
|
vinci007 wrote: mailObj.To = "'" + mailQry + "'";
What is the value for MailQry ? Try to debug it .
You may also look into this :
http://support.microsoft.com/kb/276866[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
"mailQry" retreives the value from the database. its taking the value as "rahul@ionsoftnet.com" when i'm entering the value "Rahul" in the textBox "txtfrgot"..
|
|
|
|
|
I have created a web service, when i execute the code from Editor in debug mode it works fine without any issue.
But when i run the same code from the Virtual Directory
(http://localhost/service) and try to execute the function, it gives error 500.
Can you please help in resolving the Issue
|
|
|
|
|
Hi Aman,
Does your Virtual Directory configured properly ? You can enable the Custom error mode to check what went wrong in your application.
Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
ok..I have taken one textbox in the form ..Coding is:
protected void btnSubmit_Click(object sender, EventArgs e)
{
string qry = "Server=.\\sqlexpress; Initial Catalog=dbLogin; Integrated Security=true";
SqlDataAdapter adp = new SqlDataAdapter("Select Email,(select password from tbLogin where UserName = 'Rahul') as password FROM Details WHERE UserName= 'Rahul'", qry);
DataSet ds = new DataSet();
adp.Fill(ds);
string mailQry = ds.Tables[0].Rows[0]["Email"].ToString();
string pwdQry = ds.Tables[0].Rows[0]["password"].ToString();
MailMessage mailObj = new MailMessage();
mailObj.To = "'" + mailQry + "'";
mailObj.From = "hradmin@ionsoftnet.com";
mailObj.Subject = "Your Password";
mailObj.Body = "'" + pwdQry + "' ";
SmtpMail.SmtpServer = "mail.ionsoftnet.com";
SmtpMail.Send(mailObj);
}
Note: My server address is absolutely right .
what could be the other problem?
|
|
|
|
|
Hi,
Please reply on proper thread !
Thanks !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi! I created a page that has a "Back Button", it opens up as a pop up window. The Back Button doesn't work IE but id does in FireFox Mozilla.
I have tried with window.history.go and window.history.back but non of them is working. Any Suggestion please ?
|
|
|
|
|
What is the error that you get in IE? Check if Pop up is blocked in IE.
BTW, I'm just curious here, why do you want to show a page from the history in a new window?
|
|
|
|
|
Dinesh ! there is no problem with popup blocker. I want to give a back button functionality on popup window same as normal browser window provides.
|
|
|
|
|
I'm sorry, I got it the otherway around!
Do you get any specific error message on IE? What is the server response?
Might sound silly, but check if there are pages in history. Might be there is nothing in history when u tried from IE.
|
|
|
|
|
Dinesh there is no such issue i just want to provide Back Button on popup window same as normal window has
|
|
|
|
|
The point is that the history maintenance is dependent on the browser. As far as I know, IE only maintains the history from the moment the pop-up window is opened.
So, say if you opened your site on the main window and assume this is your page flow
[Main Window] Page1 > Page2 > Page3 > Page4 > [Pop-up] Page5 > Page6
Now from the pop-up you can go back only till Page5. Page1-4 are not accessible from the pop-up.
I think FireFox maintains history differently.
|
|
|
|
|
My application doesn;t have any concern with Page1-4. the concern is if i m on Pag6 and i click Back button the window should take me to the Page5 . which is not happening
|
|
|
|
|
mm, that's interesting! I've never tried putting a back button on a pop-up, so I can't say why it is not happening. BTW, which version of IE r u using? did u try older/newer versions, other machines?
|
|
|
|
|
|
|
ya abhishek i have posted it there too because i didn't get any answer here
|
|
|
|
|
Can you tell me, are you opening every page in a new window ?
|
|
|
|
|
the scenario is like this.
i have a like on a page that opens up a popup window with another link when i click on that link another page opens in the same popup window with a back button. when i m clicking on back button it doesn't take me to the previous page.
(Normal Window)Page1->(PopupWindow)Page2->Page3(with Back Button). Now when i m clicking on the back button present on Page3 it doesn't take me to the Page2.
I have checked the window.history.length it comes zero.
|
|
|
|
|
sam# wrote: I have checked the window.history.length it comes zero.
Actually there is no way to add anything in browser cache. Even if you do, it will not work. Actually it automatically puts to browser history each page when navigates.
To put in browser history, always use <a href=""> or use location.href
dont do it using javascript.
Also if you dont want the browser to hold the current page, you need to use history.replace with the same url so that it replaces the current page with the one in history.
In your case, just change the control which navigates to the 2nd page to anchor(<a>) and I think it will start working.
|
|
|
|
|
I want to recursively list all the directories and sub directiories in c drive and organize it in treeview control can any body help me.... or else which data structure i have to use so that i can easily assign it to treview.. please help me some code snipet....
Thanks in Advance
|
|
|
|
|
Pardhu2 wrote: I want to recursively list all the directories and sub directiories in c drive and organize it in treeview control can any body help me...
Is this is related with ASP.NET ? if yes what you are going to do with this ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|