473,394 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

System.Web.Mail

I have re-installed .NET 1.1 and SP1 on multiple computers, one with
Win XP Pro and another with Win 2003, and I can't seem to get the
System.Web.Mail namespace and SmptMail and MailMessage classes. What
do I need to do to access this namespace along with the classes?

Steven

Nov 19 '05 #1
4 2237
Note that if that's not an ASP.NET project, you have to explicitly add
reference of System.Web namespace to the project in order to access it.

"SJR3t2" <SJ****@gmail.com>
???????:11**********************@g49g2000cwa.googl egroups.com...
I have re-installed .NET 1.1 and SP1 on multiple computers, one with
Win XP Pro and another with Win 2003, and I can't seem to get the
System.Web.Mail namespace and SmptMail and MailMessage classes. What
do I need to do to access this namespace along with the classes?

Steven

Nov 19 '05 #2
Thanks Lau Lei Cheong, I can now compile. But I get this error.

Unhandled Exception: System.Web.HttpException: Could not access
'CDO.Message' object. ---> System.Reflection.TargetInvocationException:
Exception has been throw
n by the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x8004020E): The server
rejected the sender address. The server response was
: 530 5.7.0 Must issue a STARTTLS command first d12sm3899146qbc

--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
Int32 culture, String[]
namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags
invokeAttr, Binder binder, Object target, Object[] args,
ParameterModifier[] modifiers, CultureI
nfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
String methodName, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
String methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at RetzNest.EMail.Main(String[] args) in d:\sjr3t2\visual studio
projects\test\email\email.cs:line 25

Any suggestions?

Nov 19 '05 #3
I suggest you bookmark this page, and give the FAQ a thorough reading :

http://www.systemwebmail.com/


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"SJR3t2" <SJ****@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I have re-installed .NET 1.1 and SP1 on multiple computers, one with
Win XP Pro and another with Win 2003, and I can't seem to get the
System.Web.Mail namespace and SmptMail and MailMessage classes. What
do I need to do to access this namespace along with the classes?

Steven

Nov 19 '05 #4
A 530 error means that your email server requires authentication.

See the URL provided by Juan for how to add username and password to the
MailMessage with Fields.

"SJR3t2" <SJ****@gmail.com>
???????:11*********************@g44g2000cwa.google groups.com...
Thanks Lau Lei Cheong, I can now compile. But I get this error.

Unhandled Exception: System.Web.HttpException: Could not access
'CDO.Message' object. ---> System.Reflection.TargetInvocationException:
Exception has been throw
n by the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x8004020E): The server
rejected the sender address. The server response was
: 530 5.7.0 Must issue a STARTTLS command first d12sm3899146qbc

--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers,
Int32 culture, String[]
namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags
invokeAttr, Binder binder, Object target, Object[] args,
ParameterModifier[] modifiers, CultureI
nfo culture, String[] namedParameters)
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
String methodName, Object[] args)
--- End of inner exception stack trace ---
at System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj,
String methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at RetzNest.EMail.Main(String[] args) in d:\sjr3t2\visual studio
projects\test\email\email.cs:line 25

Any suggestions?

Nov 19 '05 #5

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

Similar topics

4
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single...
3
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From =...
5
by: martin | last post by:
Hi, I have created a class that is totally seperate from my web application. However this class is used extensivly by the web application for stuff like data access. I wish to add a function to...
3
by: pmud | last post by:
Hi, I have ab ASP.Net Application in which I need to send e-mail on button click. Even though my C# code for that is correct.I am getting the following error:: I think the following error can be...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
by: Ryan | last post by:
Hi, I receive an access denied error (see below) when attempting to send an email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same code works fine in a console...
1
by: theWizard1 | last post by:
The following sends my email, but the attachment is empty. The attachment should contain the data that is in the string that was created from the xmlReader. I have a stored procedure written...
2
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to...
10
by: Frank | last post by:
Hi, I am hoping to find out the differences between the System.Net.Mail and System.Web.Mail. Can some nice folks post the differences; or some urls which show the differences? Great Thanks...
2
by: satnamsarai | last post by:
Using System.Net.Mail: Sometimes I get error 'failure sending mail. Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.' Not sure how...
0
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...
0
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...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.