Solved

SMTPClient error: "Command parameter not implemented. The server response was: <serverhostname>: Helo command rejected: need fully-qualified hostname"

Posted on 2006-11-05
4
3,756 Views
Last Modified: 2008-01-09
I'm getting this exception from the SmtpClient class: "Command parameter not implemented. The server response was: <(serverhostname)>: Helo command rejected: need fully-qualified hostname"

        SmtpClient sc = new SmtpClient();
        sc.Host = "mail.******.com";
        sc.Send(mm);

How can I make smtpclient send the FQDN instead of the hostname?
0
Comment
Question by:salted
  • 2
4 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 17876473
Hi salted,

see if you can find something in this FAQ: http://www.systemnetmail.com/

Cheers!
0
 
LVL 15

Expert Comment

by:ozymandias
ID: 17876550
This is probably security on the smtp server you are using.
When an SMTP session starts it is generally initiated with the following command sent by the sender:

    HELO hostname

where hostname is the name of the sending host.

Some smtp servers will do a reverse dns lookup of the hostname and compare the ip address against the IP address of the sending host.
This is basically to stop spammers and spoofers.

As a result they will not accept mail from hosts that do not have an FQDN (fully qualified domina name) or from hosts they cannot lookup using reverse DNS.
0
 
LVL 15

Accepted Solution

by:
ozymandias earned 500 total points
ID: 17876574
Sprry, I didn't read the last line of your post.
I guess you know the above.
I'm afraid its a bug/feature of the SmtpClient.
Microsoft are aware : http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94378
0
 

Author Comment

by:salted
ID: 17876638
Thanks guys,

I decided to set credentials and login to the smtp server over ssl - bypassing the need for a FQDN.

Seems MS could do with adding support for this.

Thanks for all your help!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
System.Speech 2 32
Signal R -send data to client: only if they are allowed to see it ? 1 57
Video Player 2017 5 35
compare between entities in entity framework 8 90
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question