Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on e-mail Application within the ASP.NET forums, part of the Web Development category; Hi, I want to create an application in which i can send e-mails to others, so plz help me and also tell me about web service...
|
|||||||
|
|||
|
e-mail Application
Hi,
I want to create an application in which i can send e-mails to others, so plz help me and also tell me about web service |
| The Following User Says Thank You to harshavardhan1708 For This Useful Post: | ||
| Sponsored Links |
|
|||
|
Re: e-mail Application
Hey u can send a mail
Top of the page using System.Web.Mail; method is below button1_click { String Mail_to="Testmail@test.com" MailBody = "<p align='left'><p align='left'>Dear Raj,</p><BR>"; MailBody += "<p align='left'>Good Day & Warm Greetings!</p><BR></p>"; SendMailToUser(MailBody, mail_to); } The method which sends the mail public void SendMailToUser(string mailBody, string mail_to) { MailMessage msg = new MailMessage(); msg.From = "abc@xya.com"; msg.To = mail_to; msg.Subject = "Test Mail"; msg.BodyFormat = MailFormat.Html; msg.Body = mailBody; try { SmtpMail.SmtpServer = System.Configuration.ConfigurationSettings.AppSettings["SMTPServerIP"]; SmtpMail.Send(msg); } catch (Exception excep) { //lblErrorMsg.Text = "Unable to send mail. Either email id is incorrect or the SMTP server is unavailable."; } } |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to configure php mail() function in Apache server and how to use mail() function. | yusuf456 | PHP | 0 | 04-02-2009 05:49 AM |
| Java Mail API | tirupathi.reddy | Java | 0 | 01-28-2008 09:30 PM |
| Sending mail from web application | santhi1521 | Java | 0 | 12-28-2007 04:21 AM |
| Query with mail in PHP | sripri | PHP | 0 | 07-13-2006 10:54 PM |
| Photos in E-mail! | Martin Lucas | Geeks Lounge | 0 | 06-20-2006 08:19 AM |