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,654 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 69

Expert Comment

by:Éric Moreau
Comment Utility
Hi salted,

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

Cheers!
0
 
LVL 15

Expert Comment

by:ozymandias
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now