smtp service not sending mail

S

StephenRichter

my w2k pc can send mail using outlook 2000, but when I use the
System.Web.Mail.SmtpMail class in .NET to send mail, the message just
queues up in the mailroot/queue folder and is never sent.

Is there a place to see error messages that explain why the mail is not
being sent?

The SMTP services is started and all the other services it says are
necessary are also running.

The problem must be on the config end of the SMTP service, but I dont
know how to config that service.

My PC connects to a LinkSys router, the router connects to the DSL
modem, then out to the internet via my local ISP. No firewalls in
place.

My SMTP Virtual Server properties:
access, authentication - only anonymous access is checked.
access, relay restrictions - my pc, 127.0.0.1, is permitted to relay
delivery, advanced - fully qualified domain name is my local ISP
delivery, advanced - smart host = my local ISP. ( I have tried this
value and leaving it blank. )

Any help in understanding how the SMTP service can be made to work is
appreciated,

-Steve
 
S

Steve Richter

Is there some basic networking requirement that is needed for the SMTP
service in W2K to work, to actually send mail? Does Exchange have to
be in the mix maybe?

I am following the instructions here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;314201

and here:
http://www.microsoft.com/technet/archive/itsolutions/ecommerce/deploy/d5smtp.mspx

The code I am running, modified from the first link, follows. The error
I am getting is "the transport failed to connect to the server". Using
different variations on the theme, the server name is pulled from the
"outgoing mail SMTP server" that is used in outlook 2000 for all my
email accounts.

As I understand System.Web.Mail and CDONTS, the SmtpMail.SmtpServer
property is used to bypass the SMTP service entirely? That the code
will connect directly to that server and send the mail thru it?

Which brings me to the question of how does my local ISP authenticate
me as someone who can send mail thru their server? In Outlook, the
user name and password applies only to receiving email. So my ISP's
mail server must authenticate my IP address, right? Will their server
only relay messages sent by a mail client like Outlook?

Staying on authentication of outbound mail, I recently signed up with
GoDaddy.Com for web hosting and email. GoDaddy told me to config
outlook2000 with their outgoing mail server. It does not work ( I
think my local ISP has blacklisted GoDaddy as a host of spammers! ),
but assuming it does, how does GoDaddy authenticate who is sending mail
thru their outgoing mail server?

-Steve

Imports System.Web.Mail

Dim oMsg As MailMessage = New MailMessage
oMsg.From = "(e-mail address removed)"
oMsg.To = "(e-mail address removed)"
oMsg.Subject = "Send using Web Mail"
oMsg.BodyFormat = MailFormat.Html
oMsg.Body = "<HTML><BODY><B>Hello World!</B></BODY></HTML>"
Dim sFile As String = "C:\somefile.txt"
Dim oAttch As MailAttachment = New MailAttachment(sFile,
MailEncoding.Base64)
oMsg.Attachments.Add(oAttch)
SmtpMail.SmtpServer = "the outgoing mail server used in outlook"
Try
SmtpMail.Send(oMsg)
Catch ex As Exception
Console.WriteLine(ex.ToString)
End Try
Console.ReadLine()
 

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

Top