Click here to Skip to main content
15,884,388 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: SqlCommands.ExecuteNonQuery always return -1 Pin
Abhijit Jana18-Jul-09 23:22
professionalAbhijit Jana18-Jul-09 23:22 
Questionprint continuously in javascript Pin
billcodes18-Jul-09 21:22
billcodes18-Jul-09 21:22 
AnswerRe: print continuously in javascript Pin
Christian Graus19-Jul-09 14:05
protectorChristian Graus19-Jul-09 14:05 
Questionproblem with DataSource & GridView Pin
Sider8918-Jul-09 19:46
Sider8918-Jul-09 19:46 
Questionbind css to web user control Pin
Spurple18-Jul-09 1:01
Spurple18-Jul-09 1:01 
AnswerRe: bind css to web user control Pin
Abhijit Jana18-Jul-09 1:08
professionalAbhijit Jana18-Jul-09 1:08 
AnswerRe: bind css to web user control Pin
Brij18-Jul-09 1:09
mentorBrij18-Jul-09 1:09 
QuestionSending mail....problem Pin
RajpootRohan18-Jul-09 0:11
professionalRajpootRohan18-Jul-09 0:11 
Hi to all,

I am trying to send the "contact us" from data to email on submit button click. But giving this error.

Server Error in '/VICTORIAIN' Application.
Mailbox unavailable. The server response was: not local host hotmail.com, not a gateway
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: not local host hotmail.com, not a gateway

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:

[SmtpFailedRecipientException: Mailbox unavailable. The server response was: not local host hotmail.com, not a gateway]
   System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +858231
   System.Net.Mail.SmtpClient.Send(MailMessage message) +2004
   Contact_Us.send_data_to_mail() +189
   Contact_Us.BtnSubmit_Click(Object sender, EventArgs e) +18
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 


I am using this code:

SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();

MailAddress fromAddress = new MailAddress(TxtEmail.Text, TxtName.Text);
message.From = fromAddress;
message.To.Add("rohanrajpoot@in.com");
message.Subject = "This person has contacted us!";
message.IsBodyHtml = false;
message.Body = TxtMessage.Text;
smtpClient.Send(message);


In web.config I did this:

<system.net>
  <mailSettings>
    <smtp>
      <network host="myhostname" port="25" userName="loginname" password="pass" defaultCredentials="true" />
    </smtp>
  </mailSettings>
</system.net>


Can anyone assist me....

cheers,
sneha

AnswerRe: Sending mail....problem Pin
Abhijit Jana18-Jul-09 0:22
professionalAbhijit Jana18-Jul-09 0:22 
AnswerRe: Sending mail....problem Pin
Gary Stafford18-Jul-09 4:07
Gary Stafford18-Jul-09 4:07 
QuestionShow Routeplanner to HighSlidepopup in .net Pin
getaccessyr18-Jul-09 0:04
getaccessyr18-Jul-09 0:04 
AnswerRe: Show Routeplanner to HighSlidepopup in .net Pin
Abhijit Jana18-Jul-09 0:34
professionalAbhijit Jana18-Jul-09 0:34 
GeneralRe: Show Routeplanner to HighSlidepopup in .net Pin
getaccessyr19-Jul-09 19:40
getaccessyr19-Jul-09 19:40 
QuestionNeed help! Excel 2007 throiwng RPC failed/RPC Unavailable exception on large datasets Pin
Member 420977017-Jul-09 23:09
Member 420977017-Jul-09 23:09 
Questionmenu Pin
mylogics17-Jul-09 21:23
professionalmylogics17-Jul-09 21:23 
AnswerRe: menu Pin
Blue_Boy17-Jul-09 22:24
Blue_Boy17-Jul-09 22:24 
GeneralRe: menu Pin
Manas Bhardwaj17-Jul-09 22:28
professionalManas Bhardwaj17-Jul-09 22:28 
GeneralRe: menu Pin
Blue_Boy17-Jul-09 22:31
Blue_Boy17-Jul-09 22:31 
GeneralRe: menu Pin
Abhijit Jana17-Jul-09 22:33
professionalAbhijit Jana17-Jul-09 22:33 
AnswerRe: menu Pin
Manas Bhardwaj17-Jul-09 22:27
professionalManas Bhardwaj17-Jul-09 22:27 
Questionblank forms submitting on server, all validations not working. Pin
er.puneet17-Jul-09 19:57
er.puneet17-Jul-09 19:57 
AnswerRe: blank forms submitting on server, all validations not working. Pin
himanshu256117-Jul-09 20:24
himanshu256117-Jul-09 20:24 
GeneralRe: blank forms submitting on server, all validations not working. Pin
er.puneet17-Jul-09 20:42
er.puneet17-Jul-09 20:42 
GeneralRe: blank forms submitting on server, all validations not working. Pin
himanshu256117-Jul-09 21:00
himanshu256117-Jul-09 21:00 
GeneralRe: blank forms submitting on server, all validations not working. Pin
er.puneet17-Jul-09 21:11
er.puneet17-Jul-09 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.