Hi all.
I'm using the following code to attempt to send Email, it's part of an
application I'm writing. I don't need any fancy stuff, just a simple text
message. This code is just for testing but the final thing wont be any
different apart from dragging info from a database.
I can't get around the dreaded 0x80040213 error, The transport failed to
connect to the server.
From and To are definately correct, I've tried my ISP hostname, IP and
localhost and nothing changes, same error.
What pre-requisites do I need before I can send mail? Exchange? a local
SMTP server?
I've always understood as long as I have a Gateway connection to a router,
'localhost' should find my ISP and forward mail, as long as they receive on
port 25. I've checked all virus protection, port 25 is open, can't see
anything in the firewall that should cause a problem.
I've searched every group I can think of, most point to Exchange errors.
The annoying think is, I'm sure this worked 6 months ago!
Any help would be very much appreciated!
Dim mail As System.Web.Mail.SmtpMail
Dim msg As New System.Web.Mail.MailMessage
msg.From = txtFrom.Text
msg.To = txtRecip.Text
msg.Subject = txtSubject.Text
msg.Body = txtMessage.Text
msg.BodyFormat = MailFormat.Text
mail.SmtpServer = "localhost"
Try
mail.Send(msg)
Catch ex As Exception
MsgBox(ex.ToString)
While Not (ex.InnerException Is Nothing)
ex = ex.InnerException
MsgBox(ex.ToString)
End While
End Try 2 3141
You will need an SMTP server you can relay through. <localhost> refers to
the machine you are running the application from; most PCs don't have an SMTP
server or smartrelay on them, and <localhost> will not find your ISP, since
by definition <localhost> is the PC the application is running on.
You will need to know the Fully Qualified Domain Name (i.e.
servername.isp.com) of the SMTP server, and be allowed to relay through it.
--
--ewok
MCSA+M,MCSE, MCSD, MCDBA,MCITP
"Tull Clancey" wrote: Hi all.
I'm using the following code to attempt to send Email, it's part of an application I'm writing. I don't need any fancy stuff, just a simple text message. This code is just for testing but the final thing wont be any different apart from dragging info from a database.
I can't get around the dreaded 0x80040213 error, The transport failed to connect to the server.
From and To are definately correct, I've tried my ISP hostname, IP and localhost and nothing changes, same error.
What pre-requisites do I need before I can send mail? Exchange? a local SMTP server?
I've always understood as long as I have a Gateway connection to a router, 'localhost' should find my ISP and forward mail, as long as they receive on port 25. I've checked all virus protection, port 25 is open, can't see anything in the firewall that should cause a problem.
I've searched every group I can think of, most point to Exchange errors. The annoying think is, I'm sure this worked 6 months ago!
Any help would be very much appreciated!
Dim mail As System.Web.Mail.SmtpMail Dim msg As New System.Web.Mail.MailMessage
msg.From = txtFrom.Text msg.To = txtRecip.Text msg.Subject = txtSubject.Text msg.Body = txtMessage.Text msg.BodyFormat = MailFormat.Text
mail.SmtpServer = "localhost"
Try mail.Send(msg) Catch ex As Exception MsgBox(ex.ToString)
While Not (ex.InnerException Is Nothing) ex = ex.InnerException MsgBox(ex.ToString) End While
End Try
Ah, this is all starting to ring bells!
Thanks,
Tull.
"ewok66" <ew****@discussions.microsoft.com> wrote in message
news:E7**********************************@microsof t.com... You will need an SMTP server you can relay through. <localhost> refers to the machine you are running the application from; most PCs don't have an SMTP server or smartrelay on them, and <localhost> will not find your ISP, since by definition <localhost> is the PC the application is running on.
You will need to know the Fully Qualified Domain Name (i.e. servername.isp.com) of the SMTP server, and be allowed to relay through it.
-- --ewok MCSA+M,MCSE, MCSD, MCDBA,MCITP
"Tull Clancey" wrote:
Hi all.
I'm using the following code to attempt to send Email, it's part of an application I'm writing. I don't need any fancy stuff, just a simple text message. This code is just for testing but the final thing wont be any different apart from dragging info from a database.
I can't get around the dreaded 0x80040213 error, The transport failed to connect to the server.
From and To are definately correct, I've tried my ISP hostname, IP and localhost and nothing changes, same error.
What pre-requisites do I need before I can send mail? Exchange? a local SMTP server?
I've always understood as long as I have a Gateway connection to a router, 'localhost' should find my ISP and forward mail, as long as they receive on port 25. I've checked all virus protection, port 25 is open, can't see anything in the firewall that should cause a problem.
I've searched every group I can think of, most point to Exchange errors. The annoying think is, I'm sure this worked 6 months ago!
Any help would be very much appreciated!
Dim mail As System.Web.Mail.SmtpMail Dim msg As New System.Web.Mail.MailMessage
msg.From = txtFrom.Text msg.To = txtRecip.Text msg.Subject = txtSubject.Text msg.Body = txtMessage.Text msg.BodyFormat = MailFormat.Text
mail.SmtpServer = "localhost"
Try mail.Send(msg) Catch ex As Exception MsgBox(ex.ToString)
While Not (ex.InnerException Is Nothing) ex = ex.InnerException MsgBox(ex.ToString) End While
End Try This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom Petersen |
last post by:
Our person who hosts our email recently migrated to Exchange 2003 and my ASP
emailing code quit working. I was getting this error:
CDO.Message.1 (0x80040213)
The transport failed to connect to the...
|
by: EP |
last post by:
When running my asp.net hosting service (asp.net without IIS), on server
2003 with IIS not installed, I get the following when trying to process a
request.
"System.DllNotFoundException: Unable to...
|
by: Vittorio Pavesi |
last post by:
Hi All,
sometimes (1 e-mail sent every 80) I got the following error:
System.Runtime.InteropServices.COMException (0x80040213): The transport
failed to connect to the server
What does it mean ?...
|
by: nbissette |
last post by:
I get this error "System.Runtime.InteropServices.COMException (0x80040213):
The transport failed to connect to the server." when trying to send an SMTP
mail message. The only problem is that it is...
|
by: daredevil |
last post by:
hi all,
i am newbie here. i was trying to send mail from ASP, but i encountered the error as below:-
CDO.Message.1 (0x80040213) The transport failed to connect to the server.
i already google...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
| | |