Asp.net 1.1 Email Issue

Joined
Oct 25, 2007
Messages
2
Reaction score
0
Hi,

I want to send email using asp.net 1.1 with C# , my code is

MailMessage msg=new MailMessage();
msg.To=toaddress;
msg.From=fromaddress;
msg.Subject="Test";
msg.Body="Test body";
SmtpMail.SmtpServer=mySmtpServer;
SmtpMail.Send(msg);

The same code works in asp.net 2.0 and even in c# 1.1 windows application. But when I try to use this code in asp.net 1.1 I get this error:

System.Runtime.InteropServices.COMException: The transport failed to connect to the server

Please help,
Thank You
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top