Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My Friends

I need to use the next libraries in Visual 2003

using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;


How I can Import them into my project in Visual 2003.

If I cant, there are libraries than can give me the posibility to send an
email in c#??
who are???

Thanks in advance.


Leonardo Ayala R.
Posted
Comments
TnTinMn 21-Jan-14 19:04pm    
see: Sending complex emails in .NET 1.1
http://www.codeproject.com/Articles/13236/Sending-complex-emails-in-NET-1-1

You can't. VS2003 doesn't support Linq.
 
Share this answer
 
Visual Studio 2003 may have an alternate email include you can use. Just google for what's available for that version of the .NET framework. LinQ is not supported in VS2003.
 
Share this answer
 
Hi,
You haven't need to use linq for send an email...
in vs2008 (and also in 2003) you must use something like this

Imports System.Net
Imports System.Net.Mail

...

Dim mailMessage As New MailMessage()
mailMessage.Subject = "oggetto"
mailMessage.SubjectEncoding = System.Text.Encoding.UTF8
mailMessage.BodyEncoding = System.Text.Encoding.UTF8
mailMessage.IsBodyHtml = True

Dim smtpClient As New SmtpClient()
smtpClient.EnableSsl = False
smtpClient.Host = _Impostazioni.HostSMTP
smtpClient.UseDefaultCredentials = False
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network
smtpClient.Credentials = New NetworkCredential(EmailCredential, Password)
mailMessage.From = New MailAddress("emailFrom@...", "emailTo@...")
mailMessage.[Bcc].Add(New MailAddress("emailTo@...", String.Empty))

mailMessage.Body = String.Format("{0}", "message")

Dim _attachment As New Attachment(pathFile)
mailMessage.Attachments.Add(_attachment)


smtpClient.Send(mailMessage)

mailMessage.Dispose()
mailMessage = Nothing
smtpClient = Nothing
 
Share this answer
 
Comments
Ron Beyer 21-Jan-14 17:53pm    
System.Net.Mail is not available in VS2003, it wasn't introduced until .NET 2.0 or VS2005. VS2003 only works with .NET 1.1

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900