SMTP throws exception

G

Guest

Hello,

I have an ASP page which was working fine and broke all of a sudden. It uses
SMTPMail to send out email, here is some code snippet:

mailObj.From = EmailFrom
mailObj.To = EMailTO
If (Len(Trim(EMailCc)) > 0) Then
mailObj.Cc = EMailCc
End If
mailObj.Subject = EmailSubject
mailObj.Body = EMailBody
mailObj.BodyFormat = MailFormat.Html
SmtpMail.Send(mailObj) 'Right now it always fails on this line.

The error message I got is:
External component has thrown an exception

I checked SmtpServer, It's working fine. I suspect there is something with
SMTP component installed in that machine, but I don't know how to reinstall
the component. Or is there anything else I should pay attention to ?

TIA
 
K

Kevin Spencer

Or is there anything else I should pay attention to ?

Does the SMTP server allow relaying?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
M

Mark Fitzpatrick

In addition to what Kevin says, does the smtp server require authentication
in order to send?

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
G

Guest

Yes. SMTP server allows relaying. In fact I have another server (the
production server) running the same codes as this one (development server)
which is working fine.
 

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

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,832
Latest member
UtaHetrick

Latest Threads

Top