473,473 Members | 2,207 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SMTP throws exception

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
Nov 19 '05 #1
3 1374
> 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" <Ed****@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
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

Nov 19 '05 #2
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" <Ed****@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
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

Nov 19 '05 #3
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" <Ed****@discussions.microsoft.com> wrote in message
news:FE**********************************@microsof t.com...
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


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
5
by: Charlie | last post by:
Hi: I'm working on an e-commerce site. Using the SMTP class, my site sends out confirmation messages. It works most of the time, but sometimes raises an error. I need a way of making sure it...
1
by: Kees | last post by:
Hi there, Im having a bit of trouble with a logfile I use to put logevents in with a streamwriter, after I have written in this file I want to send the file as a mailattachment with smtp. This...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
0
by: jlconde | last post by:
I have a classe to send mails. It runs on yahoo well but with hotmail I never receive the mails.I do not receive an error neither. I would need some strange header to make the hotmail like my...
0
by: sudipmondal440 | last post by:
import javax.mail.*; import javax.mail.internet.*; import java.util.*; import javax.activation.*; import javax.swing.text.*; import javax.swing.*; import java.io.*; import java.awt.*; ...
7
by: lilbit02 | last post by:
I'm trying to figure this out with out any Java experience. I'm trying to write a program that will send a SMTP email. I was given a shell and I do know how to establish a connection. My next...
1
by: rajujrk | last post by:
hi, i am currently sending mail through the JavaMail API. I had a problem to find out the SMTP mailserver. First i tried in airtel broadband Connection its works fine.. but now i using it in my...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.