Sending email by using C#

  • Thread starter Thread starter Jason Zhou
  • Start date Start date
J

Jason Zhou

Hi,

I am new here, hope my question is not too stupid.

I want to send out email from my application by using C#, I was told to use
smtp, the sample code is very simple, I am using smtpmail.send(), the
questions are:

1. What does the relationship between smtp and pop3?
2. I had impression that I need account and password for smtp, how come I
don't need to specify in smtpmail object (and no method or property to let
me specify)?
3. I am keeping getting an error message like 'Could not access
'CDO.message' object', is it because the smtp is not available?

Thanks in advance!

Jason
 
Hi Jason:

1) In a nutshell, use SMTP to send mail, use POP3 to retrieve mail.

2) SMTP generally does not involve a username or password, although
some situations do require credentials. Often times an SMTP server
will rely on other information, such as a recent POP3 login or a
specific IP address to authenticate. (See the URL in #3 if you need to
pass a username and password).

3) http://www.systemwebmail.com/default.aspx has plenty of
troubleshooting information.

HTH,
 
Hi Jason,

If you use localhost as smtp server you would not need a username or password. But unless you also installed the smtp service in iis you will get a CDO error each time you try to use it.

Happy coding!
Morten Wennevik [C# MVP]
 
Morten,

Yeah I need to change something in my smtp service property, thanks for the
information!

Jason

Morten Wennevik said:
Hi Jason,

If you use localhost as smtp server you would not need a username or
password. But unless you also installed the smtp service in iis you will
get a CDO error each time you try to use it.
Happy coding!
Morten Wennevik [C# MVP]
 

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

Similar Threads

Send Email from C# App 4
Send email using C#? 6
error sending mail 3
SMTP Server 1
Send Mail Problem 3
Problems sending emails 1
SMTP sending 1
I can't send mail using SMTPClient but Outlook Express can! 1

Back
Top