Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: 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
good
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 192.168.xxx.xxx default server are not available" default servern address:192.168.xxx.xxx
 
thanks
  Permalink  
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can Ping the Server IP via CMD
Example Ping www.google.com
Thanks
  Permalink  
v2
Comments
phil.o at 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 at 20-Mar-13 8:16am
   
You can ping the ip via CMD
ping www.google.com.
Thanks
baskaran chellasamy at 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 at 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)



Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2014
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