SMTP Email

G

Guest

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)?
 
B

Ben Lucas

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".
 
J

Jc Morin

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.
 
G

Guest

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?
 
G

Guest

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,104
Latest member
LesliVqm09
Top