Click here to Skip to main content
15,915,094 members
Home / Discussions / C#
   

C#

 
AnswerRe: Object creation Pin
S. Senthil Kumar10-Mar-07 5:07
S. Senthil Kumar10-Mar-07 5:07 
Questionselected event of CheckedListBox--plz help Pin
pashitech9-Mar-07 19:10
pashitech9-Mar-07 19:10 
AnswerRe: selected event of CheckedListBox--plz help Pin
Stefan Troschuetz9-Mar-07 21:08
Stefan Troschuetz9-Mar-07 21:08 
GeneralRe: selected event of CheckedListBox--plz help Pin
Wayne Phipps10-Mar-07 1:03
Wayne Phipps10-Mar-07 1:03 
Questionselected event of CheckedListBox--plz help Pin
pashitech9-Mar-07 19:08
pashitech9-Mar-07 19:08 
Questionhow to draw listbox items with different itemheight when i selected a item Pin
goldli9-Mar-07 18:26
goldli9-Mar-07 18:26 
AnswerRe: how to draw listbox items with different itemheight when i selected a item Pin
Mike Hankey10-Mar-07 2:48
mveMike Hankey10-Mar-07 2:48 
QuestionMail Pin
Jijo BP9-Mar-07 17:46
Jijo BP9-Mar-07 17:46 
Hi friends,

I am facing a PROBLEM WHILE I send mails with the SMTP class of System.Net.Mail.

The code shows below.

MailMessage mail = new MailMessage();

//set the addresses
mail.From = new MailAddress("from@domain.com");
mail.To.Add("to@domain.com");

//set the content
mail.Subject = "This is an email";
mail.Body = "this is the body content of the email.";


//send the message
SmtpClient smtp = new SmtpClient("mysmtpserver.net");


//to authenticate we set the username and password properites on the SmtpClient
smtp.Credentials = new System.Net.NetworkCredential("user@domain.com", "password");
smtp.Send(mail);



I have a valid smtp server name, username and password. I configured it to outlook and working fine. And wen I test it using telnet port 25 then also its working.


I upload the file to my hosting space. I have two hosting account with godaddy.

The mailing script is working fine in one hosting account. That hosting account have SSL and dedicated IP address.

But the mailing code is not working in the other hosting account. That hosting account is Windows hosting + ASP.NET 2.0 supported.


The error I am getting is as shown as below.






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.Button1_Click(Object sender, EventArgs e)



Please help me on this issue....
Thanks in advance....




JIJO BABY - Lets Play C#

AnswerRe: Mail Pin
S. Senthil Kumar10-Mar-07 5:10
S. Senthil Kumar10-Mar-07 5:10 
QuestionWord Template Programming in C# Pin
satsumatable9-Mar-07 17:36
satsumatable9-Mar-07 17:36 
QuestionMethod Matching Pin
SHaroz9-Mar-07 17:20
SHaroz9-Mar-07 17:20 
AnswerRe: Method Matching Pin
S. Senthil Kumar10-Mar-07 5:13
S. Senthil Kumar10-Mar-07 5:13 
QuestionConstructors in C# Pin
Captain See Sharp9-Mar-07 15:57
Captain See Sharp9-Mar-07 15:57 
AnswerRe: Constructors in C# Pin
Scott Dorman9-Mar-07 17:31
professionalScott Dorman9-Mar-07 17:31 
AnswerRe: Constructors in C# Pin
Zoltan Balazs10-Mar-07 1:59
Zoltan Balazs10-Mar-07 1:59 
GeneralRe: Constructors in C# Pin
Captain See Sharp10-Mar-07 13:42
Captain See Sharp10-Mar-07 13:42 
AnswerRe: Constructors in C# Pin
S. Senthil Kumar10-Mar-07 5:20
S. Senthil Kumar10-Mar-07 5:20 
GeneralRe: Constructors in C# Pin
Captain See Sharp10-Mar-07 13:37
Captain See Sharp10-Mar-07 13:37 
GeneralRe: Constructors in C# Pin
S. Senthil Kumar10-Mar-07 13:46
S. Senthil Kumar10-Mar-07 13:46 
GeneralRe: Constructors in C# Pin
Captain See Sharp10-Mar-07 13:51
Captain See Sharp10-Mar-07 13:51 
GeneralRe: Constructors in C# Pin
gumi_r@msn.com10-Mar-07 14:29
gumi_r@msn.com10-Mar-07 14:29 
GeneralRe: Constructors in C# Pin
Captain See Sharp10-Mar-07 13:54
Captain See Sharp10-Mar-07 13:54 
GeneralRe: Constructors in C# Pin
S. Senthil Kumar10-Mar-07 14:21
S. Senthil Kumar10-Mar-07 14:21 
QuestionState Mangement Pin
Renuka Reddy9-Mar-07 15:33
Renuka Reddy9-Mar-07 15:33 
AnswerRe: State Mangement Pin
Udhaya Kumar.D10-Mar-07 4:19
Udhaya Kumar.D10-Mar-07 4:19 

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.