For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > December 2007 > SMTP troubles and odd fix...why does this work?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

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

2007-12-30, 7:21 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


sloan

2007-12-30, 7:21 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/Blog/cns!A68482B9628A842A!138.entry


where I have that line.



"Darrel" <notreal@nospam.com> wrote in message
news:evGbMmySIHA.5136@TK2MSFTNGP04.phx.gbl...
> 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
>



Darrel

2007-12-30, 7:21 pm

> 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


sloan

2007-12-31, 4:31 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@nospam.com> wrote in message
news:uN71tYzSIHA.4740@TK2MSFTNGP02.phx.gbl...
>
> That appears to be C#?
>
> I'm using Vb.net in this case.
>
> Is the blank server 'fix' OK to use?
>
> -Darrel
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com