SMTP throws exception

Discussion in 'ASP .Net' started by =?Utf-8?B?RWQgQ2hpdQ==?=, Mar 3, 2005.

  1. 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
    =?Utf-8?B?RWQgQ2hpdQ==?=, Mar 3, 2005
    #1
    1. Advertising

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

    "Ed Chiu" <> wrote in message
    news:...
    > 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
    >
    >
    Kevin Spencer, Mar 3, 2005
    #2
    1. Advertising

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

    Hope this helps,
    Mark Fitzpatrick
    Microsoft MVP - FrontPage

    "Ed Chiu" <> wrote in message
    news:...
    > 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
    >
    >
    Mark Fitzpatrick, Mar 3, 2005
    #3
  4. 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.

    "Kevin Spencer" wrote:

    > > 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.
    >
    > "Ed Chiu" <> wrote in message
    > news:...
    > > 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
    > >
    > >

    >
    >
    >
    =?Utf-8?B?RWQgQ2hpdQ==?=, Mar 3, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Miller
    Replies:
    4
    Views:
    13,270
    Chris Smith
    Nov 22, 2003
  2. Replies:
    3
    Views:
    1,048
    Roedy Green
    Jan 24, 2006
  3. Alex Hunsley
    Replies:
    4
    Views:
    3,408
    Tim Williams (gmail)
    Jun 29, 2004
  4. Raaijmakers, Vincent \(GE Infrastructure\)

    RE: sending of mail (smtp) - connection refused - but smtp serveris running!

    Raaijmakers, Vincent \(GE Infrastructure\), Jun 29, 2004, in forum: Python
    Replies:
    0
    Views:
    861
    Raaijmakers, Vincent \(GE Infrastructure\)
    Jun 29, 2004
  5. Replies:
    2
    Views:
    324
Loading...

Share This Page