Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends

I am just try to send email from my system using c# code. but i dont know my remote smtp ip address. without know this smtp ip address, i cannot send email.please tell me how can find my system smtp address/
Thank you
Posted

Just open your command prompt and type nslookup if your DNS Server already setup then you get information otherwise you see "can't find server name for address 192.168.xxx.xxx default server are not available" default servern address:192.168.xxx.xxx

thanks
 
Share this answer
 
The SMTP server to use depends on your IT architecture ; if you have an intern mail server (like Exchange, Zarafa, etc.), you will have to use this one.
If you don't have an intern mail server, then you will have to use the smtp server of your internet access provider (and ask your question to its support team to get the right smtp address).
And last, you can open a free mail account (gmail, yahoo, whatever...) and use their smtp server, if possible.
 
Share this answer
 
You can Ping the Server IP via CMD
Example Ping www.google.com
Thanks
 
Share this answer
 
v2
Comments
phil.o 20-Mar-13 8:15am    
I would be curious to see the procedure for that ^^
Outlook Express is a mail client, and, unless it is still configured, it is not designed to retrieve the smtp server address for a specific customer.
[no name] 20-Mar-13 8:16am    
You can ping the ip via CMD
ping www.google.com.
Thanks
baskaran chellasamy 20-Mar-13 8:47am    
actually i found smtp address by typing ping smtp.server.com. that adddress is 216.69.186.201. and my code for sending email is
MailMessage Msg = new MailMessage();
// Sender e-mail address.
Msg.From = txtFrom.Text;
// Recipient e-mail address.
Msg.To = txtTo.Text;
Msg.Subject = txtSubject.Text;
Msg.Body = txtBody.Text;
// your remote SMTP server IP.
SmtpMail.SmtpServer = "216.69.186.201";
SmtpMail.Send(Msg);
Msg = null;
Page.RegisterStartupScript("UserMsg", "<script>alert('Mail sent thank you...');if(alert){ window.location='SendMail.aspx';}</script>");


and the error is
The message could not be sent to the SMTP server. The transport error code was 0x800ccc6f. The server response was 554 Your access to this mail system has been rejected due to the sending MTA's poor reputation. If you believe that this failure is in error, please contact the intended recipient via alternate means.

How can solve this problem.
phil.o 20-Mar-13 12:12pm    
What is your internet access provider ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900