Email

L

Len

Hi,SmtpMail.Send(email);


I am trying to work thru some examples on webforms.

I can't get the email portion to work."SmtpMail.Send(email)";

I have xppro, visual studio academic, and outllook 2003.

Can you teel me what I need to install and where I can find it.

Thanks

Len

MailAttachment attachment= new
MailAttachment("c:\\Inetpub\\wwwroot\\SkyShark\\NA\\PrivacyPolicy.doc");

MailMessage email= new MailMessage();

email.Attachments.Add(attachment);

email.To=username + "@niit.com";

email.From="(e-mail address removed)";

email.Subject="Message from SkyShark Airlines";

email.Body="Dear " + username + ",\n\nYour account has been added " +

"to the SkyShark Airlines application. You can log on to the " +

"application at http://npandey-d185/skyshark. \n\nYour logon name" +

" is " + username + " and the password is password. Please change" +

" your password when you log on. \n\n By logging on to the application," +

" you agree to abide by the terms and conditions attached in the mail" +

"\n\n Happy Browsing.\n\n Network Administrator (SkyShark)";
 
A

Andrew Banks

I'm quite new to dot.net but noticed you don't refer to a SMTP server
anywhere in your code so I assume it will look for a local SMTP server (?)

Do you have one set up?
 
L

Len

Thanks,
I thought that might be the problem. Do you happen to know where I can
download a simple smtp server I am only going to use it in a test
environment?
Len
 
H

Hermit Dave

think iis does ship with smtp server... all you need to do is set it up to
forward the request to say your isp's smtp server... that should sort you
out... :)
 

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,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top