Click here to Skip to main content
11,929,675 members (48,875 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# C#4.0
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 20-Mar-13 2:53am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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 default server are not available" default servern

Rate this: bad
Please Sign up or sign in to vote.

Solution 3

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can Ping the Server IP via CMD
Example Ping
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.
onurag19 20-Mar-13 8:16am
You can ping the ip via CMD
baskaran chellasamy 20-Mar-13 8:47am
actually i found smtp address by typing ping that adddress is 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 = "";
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100