473,378 Members | 1,489 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,378 software developers and data experts.

Email... HELP

//create the mail message
MailMessage mail = new MailMessage();

//set the addresses
mail.From = new MailAddress("fe****@gmail.com");
mail.To.Add("fe****@gmail.com");

//set the content
mail.Subject = "This is an email";
mail.Body = "this is the body content of the email.";

//send the message
SmtpClient smtp = new SmtpClient("smtp.gmail.com");

smtp.EnableSsl = false;

//to authenticate we set the username and password
properites on the SmtpClient
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Credentials = new
NetworkCredential("gmailLogin","gmailPassword","lo calhost");
smtp.Send(mail);
itīs ok??
why it does not send the email??

Mar 28 '06 #1
1 1204
Put a breakpoint on the line you create a new instance of SmtpClient and
check what is missing...
"blini" <fe**********@gmail.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
//create the mail message
MailMessage mail = new MailMessage();

//set the addresses
mail.From = new MailAddress("fe****@gmail.com");
mail.To.Add("fe****@gmail.com");

//set the content
mail.Subject = "This is an email";
mail.Body = "this is the body content of the email.";

//send the message
SmtpClient smtp = new SmtpClient("smtp.gmail.com");

smtp.EnableSsl = false;

//to authenticate we set the username and password
properites on the SmtpClient
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Credentials = new
NetworkCredential("gmailLogin","gmailPassword","lo calhost");
smtp.Send(mail);
itīs ok??
why it does not send the email??
Mar 29 '06 #2

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

Similar topics

13
by: ~ Le Naja ~ | last post by:
Hello evrybody, First, I hope you will understand my English because I come from Belgium ! :-) Here is what I want to know if you have the kindess to help me ! :-) I use the code above to mail...
5
by: jason | last post by:
I could sure use some conceptualization and query help with a Page Watch System I am building in Access 2000 and Asp. I need to cycle through databae and generate a compiliation query email that...
9
by: NickH | last post by:
Hi, Thanks in advance for any help you can provide. I have a frameset and one of the frames contains a page that is created on the fly, an actual word document. I want to have a button in one of...
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
9
by: Bob Jones | last post by:
We have developed a commercial ASP.net application (personal nutrition management and tracking); we want to send smtp email from within it. For our development box, we use WinXP Pro, IIS 5.5,...
58
by: PC Datasheet | last post by:
ENOUGH IS ENOUGH!!!!!!!! Today I received over 1000 bounced emails. Arno R and his goons are sending mass emails with my email address to fictitious addresses and they are bouncing back to my...
36
by: Liam.M | last post by:
hey guys, I have one last problem to fix, and then my database is essentially done...I would therefore very much appreciate any assistance anyone would be able to provide me with. Currently I...
8
by: needhelp | last post by:
Hi there, I really need some help, everything I've tried, all I've found, doesn't seem to work. I have lost an email address which is very important to me. I really need to contact that person...
3
by: jambonjamasb | last post by:
Hi I have two tables: email_tbl Data_table Data table is is used to create a Form Data_form
0
by: Ahmed, Shakir | last post by:
Thanks everyone who tried to help me to parse incoming email from an exchange server: Now, I am getting following error; I am not sure where I am doing wrong. I appreciate any help how to resolve...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.