Thursday, March 29, 2012

SMTP Email

I cant get an email out using System.Web.Mail.SmtpMail.Send(msg)
If I enter a SmtpMail.SmtpServer, then I get the error, "The server rejected
the sender address. Invalid Address"
If I dont enter one, I don't get a .NET error, but my mail ends up in the
mailroot\Drop folder with a "DNS Failure".
Also, should the SmtpServer name be the DNS (ie., mycomputer.def.com) or
just the name of the computer/SMTP (ie., mycomputer)?Looks like your SMTP server is configured in such a way that it is rejecting
the e-mail due to the e-mail address that it is from. This would be
something that would have to be configured on the SMTP server.

More often than not, I use a DNS name for the SmtpServer name. However, it
just needs to resolve to the IP address of the SMTP server. For example, if
your local machine was an SMTP server, you could use "localhost".

--
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

"klynn" <klynn@.discussions.microsoft.com> wrote in message
news:E7446AE9-6D4F-4FDD-A204-3533344E9352@.microsoft.com...
> I cant get an email out using System.Web.Mail.SmtpMail.Send(msg)
> If I enter a SmtpMail.SmtpServer, then I get the error, "The server
> rejected
> the sender address. Invalid Address"
> If I dont enter one, I don't get a .NET error, but my mail ends up in the
> mailroot\Drop folder with a "DNS Failure".
> Also, should the SmtpServer name be the DNS (ie., mycomputer.def.com) or
> just the name of the computer/SMTP (ie., mycomputer)?
Hi Klynn,

The SMTP value should be your ISP SMTP server (the same as Outlook or any
mail system used)... If your server have it's own smtp, you can just used
localhost.

--------
Jean-Claude Morin, MCP
Software Developer
2k1Soft/kCentric, Canada

"klynn" <klynn@.discussions.microsoft.com> wrote in message
news:E7446AE9-6D4F-4FDD-A204-3533344E9352@.microsoft.com...
> I cant get an email out using System.Web.Mail.SmtpMail.Send(msg)
> If I enter a SmtpMail.SmtpServer, then I get the error, "The server
rejected
> the sender address. Invalid Address"
> If I dont enter one, I don't get a .NET error, but my mail ends up in the
> mailroot\Drop folder with a "DNS Failure".
> Also, should the SmtpServer name be the DNS (ie., mycomputer.def.com) or
> just the name of the computer/SMTP (ie., mycomputer)?
When I enter "localhost", my message is "The Server rejected one or more
recipient addresses. Unable to relay for <myemailaddress> (which is the "to
address")
What does this mean?

"Jc Morin" wrote:

> Hi Klynn,
> The SMTP value should be your ISP SMTP server (the same as Outlook or any
> mail system used)... If your server have it's own smtp, you can just used
> localhost.
>
> --------
> Jean-Claude Morin, MCP
> Software Developer
> 2k1Soft/kCentric, Canada
>
> "klynn" <klynn@.discussions.microsoft.com> wrote in message
> news:E7446AE9-6D4F-4FDD-A204-3533344E9352@.microsoft.com...
> > I cant get an email out using System.Web.Mail.SmtpMail.Send(msg)
> > If I enter a SmtpMail.SmtpServer, then I get the error, "The server
> rejected
> > the sender address. Invalid Address"
> > If I dont enter one, I don't get a .NET error, but my mail ends up in the
> > mailroot\Drop folder with a "DNS Failure".
> > Also, should the SmtpServer name be the DNS (ie., mycomputer.def.com) or
> > just the name of the computer/SMTP (ie., mycomputer)?
>
"klynn" <klynn@.discussions.microsoft.com> wrote in message
news:3BE504B4-D5BF-462F-88E7-24A73E61E958@.microsoft.com...

> When I enter "localhost", my message is "The Server rejected one or more
> recipient addresses. Unable to relay for <myemailaddress> (which is the
> "to
> address")
> What does this mean?

http://www.systemwebmail.com
Still getting DNS Failures when I use the DNS name. It makes it through
ASP.NET but the email ends up in the inetpub\mailroot\Drop folder. I noticed
that my Relay Restrictions list only allows my IP address through (it doesnt
list the domain name). Wonder if that is a problem? Same with my connections
list.

"Mark Rae" wrote:

> "klynn" <klynn@.discussions.microsoft.com> wrote in message
> news:3BE504B4-D5BF-462F-88E7-24A73E61E958@.microsoft.com...
> > When I enter "localhost", my message is "The Server rejected one or more
> > recipient addresses. Unable to relay for <myemailaddress> (which is the
> > "to
> > address")
> > What does this mean?
> http://www.systemwebmail.com
>
Phew. Finally fixed this one. It has to do with only allowing certain email
addresses out. So when I use outlook to send to my own email, it fails, but
when I use it to send to someone else's it works. So "DNS Failures" isn't
the SMTPs server DNS, but I think my own DNS (the to-email address). Then,
once I realized what was going on in Outlook, I got the ASP.NET to do the
same thing. It can send to the allowable email address, but not to my own (I
have no idea why, but at this point, it doesnt matter, cause the allowable
address is the one that it needs in my application).
anyway, thats it.

"klynn" wrote:

> Still getting DNS Failures when I use the DNS name. It makes it through
> ASP.NET but the email ends up in the inetpub\mailroot\Drop folder. I noticed
> that my Relay Restrictions list only allows my IP address through (it doesnt
> list the domain name). Wonder if that is a problem? Same with my connections
> list.
> "Mark Rae" wrote:
> > "klynn" <klynn@.discussions.microsoft.com> wrote in message
> > news:3BE504B4-D5BF-462F-88E7-24A73E61E958@.microsoft.com...
> > > When I enter "localhost", my message is "The Server rejected one or more
> > > recipient addresses. Unable to relay for <myemailaddress> (which is the
> > > "to
> > > address")
> > > What does this mean?
> > http://www.systemwebmail.com

0 comments:

Post a Comment