Previous in Forum: Parellel Port To USB Connection   Next in Forum: Monitor Resolutions
Close
Close
Close
3 comments
Rate Comments: Nested
Participant

Join Date: Dec 2011
Posts: 1

C# Email Application

12/11/2011 10:13 AM

hi, i want to make an email application through c# n i have debugging error on

"client.Send(mail);"

n em using this code

"using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Web;

using System.Net.Mail;

namespace ConsoleApplication6

{

class Program

{

static void Main(string[] args)

{

SmtpClient client= new SmtpClient("smtp.gmail.com");

client.UseDefaultCredentials = true;

MailMessage mail = new MailMessage();

client.EnableSsl = true;

client.Credentials = new System.Net.NetworkCredential("tousifshaikh.91@gmail.com", "shaikh91");

mail.To.Add(new MailAddress("tousifshaikh.91@gmail.com"));

mail.From = new MailAddress( "tousifshaikh.91@gmail.com");

mail.Subject = "subject";

mail.Body = "body";

client.Port = 587;

client.Send(mail);

}

}

}

" can any 1 help me plz

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
Engineering Fields - Systems Engineering - New Member Popular Science - Weaponology - New Member

Join Date: Jun 2006
Location: Borrego Springs
Posts: 2636
Good Answers: 62
#1

Re: c# email application

12/11/2011 10:18 AM

A very complete posting of the problem - That helps!

Is it throwing any particular debug error?

__________________
"If you want to get somewhere else, you must run at least twice as fast as that!"
Register to Reply
Guru

Join Date: Mar 2007
Location: by the beach in Florida
Posts: 33392
Good Answers: 1817
#2

Re: c# email application

12/11/2011 12:07 PM
__________________
All living things seek to control their own destiny....this is the purpose of life
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#3

Re: c# email application

12/11/2011 7:13 PM

hi, i want to make an email application through c# n i have debugging error on

"client.Send(mail);"

n em using this code

"............"

can any 1 help me plz

____________________________________________________________

Your coding may or may not be spot-on, but your use of language for communication leaves a lot to be desired - and doesn't lend much confidence to your post. Please refrain from "txtspk", and use English (the language of CR4).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Register to Reply 3 comments
Copy to Clipboard

Users who posted comments:

edignan (1); JohnDG (1); SolarEagle (1)

Previous in Forum: Parellel Port To USB Connection   Next in Forum: Monitor Resolutions

Advertisement