By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,247 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,247 IT Pros & Developers. It's quick & easy.

smtp.send problem

P: n/a
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?
Sep 27 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

Sep 27 '07 #2

P: n/a

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.


"Roger Garrett" <Ro**********@discussions.microsoft.comwrote in message
news:37**********************************@microsof t.com...
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?

Sep 27 '07 #3

P: n/a
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

Sep 27 '07 #4

P: n/a
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.
Sep 27 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.