HighTechTalks DotNet Forums  

SMTP troubles and odd fix...why does this work?

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss SMTP troubles and odd fix...why does this work? in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Darrel
 
Posts: n/a

Default SMTP troubles and odd fix...why does this work? - 12-30-2007 , 04:18 PM






I'm trying to send email from my application. I've been getting a "The
server rejected one or more recipient addresses." error. After some
googling, the fix I found was to make sure to NOT state a mail server for
SmtpMail.SmtpServer

Instead, do this:

SmtpMail.SmtpServer = ""

And, sure enough...that worked!? Why? Is that a viable solution?

-Darrel



Reply With Quote
  #2  
Old   
sloan
 
Posts: n/a

Default Re: SMTP troubles and odd fix...why does this work? - 12-30-2007 , 05:17 PM






Try

SmtpMail.Servers.Add("myserver");

or something like that. This is a known issue.


You can find some downloadable code here:
http://sholliday.spaces.live.com/Blo...842A!138.entry


where I have that line.



"Darrel" <notreal (AT) nospam (DOT) com> wrote

Quote:
I'm trying to send email from my application. I've been getting a "The
server rejected one or more recipient addresses." error. After some
googling, the fix I found was to make sure to NOT state a mail server for
SmtpMail.SmtpServer

Instead, do this:

SmtpMail.SmtpServer = ""

And, sure enough...that worked!? Why? Is that a viable solution?

-Darrel




Reply With Quote
  #3  
Old   
Darrel
 
Posts: n/a

Default Re: SMTP troubles and odd fix...why does this work? - 12-30-2007 , 05:49 PM



Quote:
SmtpMail.Servers.Add("myserver");
That appears to be C#?

I'm using Vb.net in this case.

Is the blank server 'fix' OK to use?

-Darrel




Reply With Quote
  #4  
Old   
sloan
 
Posts: n/a

Default Re: SMTP troubles and odd fix...why does this work? - 12-31-2007 , 12:23 AM



Ok...remove the ";" (semi colon).

The blank server probably means your own machine is relaying the messages.

You'd better check
c:\inetpub\mail\bad (or something like that) and make sure your emails are
being sent.

...

The better thing to do would be to get it to work via code. Aka...the code
I mention.

Download my sample, and you can probably get your "real" settings to work.





"Darrel" <notreal (AT) nospam (DOT) com> wrote

Quote:
SmtpMail.Servers.Add("myserver");

That appears to be C#?

I'm using Vb.net in this case.

Is the blank server 'fix' OK to use?

-Darrel




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.