C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2722
Number of posts: 5749

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
compile error Posted by jlawren7 on 16 Jul 2004 at 2:42 PM
here is the code i'm trying to compile...
***********
using mscorlib.dll;
using System.dll;
using System.Web.Mail;
using System.Web.dll;

System.Web.Mail.MailMessage mail = new MailMessage(); //<-------MailMessage is giving me a CS10116 Error
mail.To = "jiml@rochester.rr.com";
mail.From = "you@who.com";
mail.Subject = "this is a test email.";
mail.Body = "this is my test email body.";
MailAttachment attachment = new MailAttachment( Server.MapPath( "C:\temp\test.txt" ) ); //create the attachment
mail.Attachments.Add( attachment ); //add the attachment
SmtpMail.SmtpServer = "your server here"; //your real server goes here
SmtpMail.Send( mail );



i'm tryingto create a e-mail sent from the command line to be sent automatically with the default mail program.if you can get it to work, go ahead and send a message to the above e-mail in the code and state that it works. thanks for the help all !




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.