hi friends,
i am doing a project which is based on smtp mail server.. i need a class that ho we are accessing an message header or custom header for an incoming mails...
Your question is unclear. Do you want IP address of a machine or the headers of an email?
For IP address you use:
IPHostEntry ip = Dns.GetHostEntry("www.google.com");
IPAddress[] addr = ip.AddressList;
Getting headers is a little more involved, I'd suggest searching for "read email C#" in Bing or Google.
hi i need email headers too? will u give me the syntax please?
There is no simple method to access the headers. You'll have to write code to attach to the server, log in and request headers from the mail server. If you do the search I said above, you can find code where others have already written this.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.