Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

smtp.send problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roger Garrett - 27 Sep 2007 06:06 GMT
I'm having a problem using the System.Net.Mail.SmtpClient. After I set
everything up and issue the Send method it throws an exception indicating
"Sorry, that domain isn't in my list of allowed rcpthosts", which is
apparently coming from the mail server, smtpout.secureserver.net.

However, I do indeed have the email address set up properly (with GoDaddy)
and I have successully set up Outlook Express with the appropriate paremeters
so that I can send and recive emails for the email address through that
(Outlook express).
When I try to do it with System.Net.Mail.SmtpClient, and set up the
parameters the same as I set them up for Outlook Express, I get that "domain
isn't allowed" message.

Any ideas what I could be doing wrong?
santimbs@gmail.com - 27 Sep 2007 07:45 GMT
Hi,

have your set the smtp user and password? You can set the credentials
by:

  SmtpClient smtp = new SmtpClient(smtpServer, smtpPort);

  smtp.Credentials = new NetworkCredential(login, password);

  smtp.Send(message);

Santi
Roger Garrett - 27 Sep 2007 19:44 GMT
Yes, I've set the credentials. It does seem to be getting through to the
email processer server. The message I get seems to be indicating that it's
not letting me send the outgoing email to the particular email address domain
that I'm sending it to. But I also have set up Outlook Express (with all the
same paremeters) and that works just fine, both for receiving and sending
emails. So it's got me stumped as to why it doesn't work when using doing it
through my C# program.

- Roger
sloan - 27 Sep 2007 18:19 GMT
Get my downloadable code at:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!138.entry

I'd pay attention to the SSL demo I have.
Just guessing because of this name "smtpout.secureserver.net"

But my code makes it easy to try different authenication models.

> I'm having a problem using the System.Net.Mail.SmtpClient. After I set
> everything up and issue the Send method it throws an exception indicating
[quoted text clipped - 12 lines]
>
> Any ideas what I could be doing wrong?
Roger Garrett - 27 Sep 2007 22:48 GMT
I figured out the problem.

The constructor for the System.Net.NetworkCredential includes UserName,
Password, and Domain as arguments. When I specify all three I get the error
message back from the email server. When I leave off the Domain portion it
works fine, sending my email through.

This would seem to be a goof on the part of the email server. Even if I were
somehow specifying the wrong domain, the error message they respond with is
"Sorry, that domain isn't in my list of allowed rcpthosts". But that is
usually an indication that the intended recipient of the email is not within
their list of valid recipients. It is NOt usually an indication that the
authentication failed.

So, it works no, after four hours of searching the Internet and
trial-and-error.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.