Click here to Skip to main content
15,892,746 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionStoring the dataset of a gridview Pin
ss.mmm18-Oct-07 10:11
ss.mmm18-Oct-07 10:11 
AnswerRe: Storing the dataset of a gridview Pin
N a v a n e e t h18-Oct-07 18:38
N a v a n e e t h18-Oct-07 18:38 
QuestionDebugging 2.0 controls in aspx page??? Pin
Goalie3518-Oct-07 9:35
Goalie3518-Oct-07 9:35 
QuestionMaster page inside a master page Pin
Md Arif18-Oct-07 9:32
Md Arif18-Oct-07 9:32 
AnswerRe: Master page inside a master page Pin
Guffa18-Oct-07 11:45
Guffa18-Oct-07 11:45 
QuestionAccess Code behind variable from JavaScript Pin
ss.mmm18-Oct-07 8:52
ss.mmm18-Oct-07 8:52 
AnswerRe: Access Code behind variable from JavaScript Pin
pmarfleet18-Oct-07 9:53
pmarfleet18-Oct-07 9:53 
Questionexeption in sending email using asp.net with smtp server with from gmail server Pin
yogesh_softworld12318-Oct-07 8:30
yogesh_softworld12318-Oct-07 8:30 
i have used this code for sending mail . code was successfully running but msg was not sent to the client. i have using this below information.



To yogesh_softworld@yahoo.co.in
From yogeshdewangan97@gmail.com
SMTP Server 66.249.89.19 (gmail server ip)
SMTP User 127.0.0.1 (local host)
SMTP Pass archana123
Subject test email
Body abcabcabc.........................bc



using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

// This tutorial is provided in part by Server Intellect Web Hosting Solutions http://www.serverintellect.com

// Visit http://www.AspNetTutorials.com for more ASP.NET Tutorials

}
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{

MailMessage message = new MailMessage(txtFrom.Text, txtTo.Text, txtSubject.Text, txtBody.Text);
SmtpClient emailClient = new SmtpClient(txtSMTPServer.Text);
System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential(txtSMTPUser.Text, txtSMTPPass.Text);
emailClient.UseDefaultCredentials = false;
emailClient.Credentials = SMTPUserInfo;
emailClient.Send(message);
litStatus.Text = "Message Sent";

}
catch (Exception ex)
{
litStatus.Text=ex.ToString();
}
}
}


then an exception was occured



System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at _Default.btnSubmit_Click(Object sender, EventArgs e) in e:\Yatra\Default.aspx.cs:line 32


wht can i do????
pls help me sir


yogesh

AnswerRe: exeption in sending email using asp.net with smtp server with from gmail server Pin
Fred_Smith18-Oct-07 11:35
Fred_Smith18-Oct-07 11:35 
GeneralRe: exeption in sending email using asp.net with smtp server with from gmail server Pin
yogesh_softworld12318-Oct-07 18:12
yogesh_softworld12318-Oct-07 18:12 
GeneralRe: exeption in sending email using asp.net with smtp server with from gmail server Pin
Fred_Smith18-Oct-07 22:28
Fred_Smith18-Oct-07 22:28 
GeneralRe: exeption in sending email using asp.net with smtp server with from gmail server Pin
yogesh_softworld12319-Oct-07 0:23
yogesh_softworld12319-Oct-07 0:23 
GeneralRe: exeption in sending email using asp.net with smtp server with from gmail server Pin
Fred_Smith19-Oct-07 0:29
Fred_Smith19-Oct-07 0:29 
QuestionHow can i build up a search engine in ASP.NET Pin
Sandep H S18-Oct-07 5:29
Sandep H S18-Oct-07 5:29 
AnswerRe: How can i build up a search engine in ASP.NET Pin
Abhijit Jana18-Oct-07 5:46
professionalAbhijit Jana18-Oct-07 5:46 
AnswerRe: How can i build up a search engine in ASP.NET Pin
Sandeep Akhare18-Oct-07 23:59
Sandeep Akhare18-Oct-07 23:59 
Questionprint report Pin
SVb.net18-Oct-07 5:28
SVb.net18-Oct-07 5:28 
AnswerRe: print report Pin
Abhijit Jana18-Oct-07 5:47
professionalAbhijit Jana18-Oct-07 5:47 
QuestiongridView add/delete/update Pin
manalabbas18-Oct-07 5:11
manalabbas18-Oct-07 5:11 
AnswerRe: gridView add/delete/update Pin
Abhijit Jana18-Oct-07 5:17
professionalAbhijit Jana18-Oct-07 5:17 
QuestionProblem in fetching values from database. Pin
aspnet2.developer18-Oct-07 4:32
aspnet2.developer18-Oct-07 4:32 
AnswerRe: Problem in fetching values from database. Pin
DigiOz Multimedia18-Oct-07 5:57
DigiOz Multimedia18-Oct-07 5:57 
GeneralRe: Problem in fetching values from database. Pin
aspnet2.developer18-Oct-07 6:47
aspnet2.developer18-Oct-07 6:47 
AnswerRe: Problem in fetching values from database. Pin
Guffa18-Oct-07 7:18
Guffa18-Oct-07 7:18 
Questiondirectly insert into aspnet_Membership Pin
ru_cscoder18-Oct-07 4:31
ru_cscoder18-Oct-07 4:31 

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.