C# and SMTP

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

I'm using a C# console program to connect to my smtp server and send a
simple email message to show my class. Does anyone know why some email
servers do not accept the message that I'm trying to send?

I just have the basics in the message:

To Receipients
From address
Subject
Body

Do I have to populate any other part of the message object to allow other
servers to accept my message?
 
Some servers require authentication to send emails. Perhaps that is the
problem. The .NET email components don't provide a way to specify this,
however.
 
Marina said:
Some servers require authentication to send emails. Perhaps that is the
problem. The .NET email components don't provide a way to specify this,
however.
You can find some SMTP mailer classes out there that do authentication...

Check out the slow-as-molasses site:
http://www.codeproject.com/csharp/smtpauthlogin.asp
http://www.codeproject.com/dotnet/SMTP_with_Authentication.asp

They open sockets directly to the SMTP server, completely ignoring
CDONTS and CDO (which is preferable).
 
Hi,

You should no send the email directly to the recipient server, you instead
should use yours, several ISP ( mine does ) restrict the connections to
SMTP, other server are starting to implement a security measure ( don't
remember the correct name now) that before accept an email coming from
(e-mail address removed) check with the DNS of hotmail.com which are the servers
that can send email with it domain, if your machine is not you cannot send
it.

Also as Marina suggested a lot of servers requires auth before accepting
email

Cheers,
 
Back
Top