Click here to Skip to main content
Licence CPOL
First Posted 6 Aug 2008
Views 19,949
Downloads 1,668
Bookmarked 49 times

.NET Mail Composer

By | 6 Aug 2008 | Article
Compose mail messages and send them through your mail account provider.

Introduction

This is a simple application developed using C# to send mail (with attachments) to multiple users. It uses an SMTP server to send mails.

Using the demo

To use the demo application, open "MailComposer.exe" from the demo link above. Type the subject and the body of the message. If the body of the message needs to be in HTML format, then select the checkbox provided below the body.

After typing in the normal message body and the subject, click Other --> Add Attachments. The form shown below will be displayed:

In the above window, click on the Add button to browse and add a new attachment. Add all the files to be attached, and then click the OK button to save the attachments. When you click the OK button, the attachments window will be closed and the previous form will be visible. Finally, to send the mail, you require a mail provider and a valid account to connect and send the mail. So, click Other --> Settings to open the form below to provide the settings.

  1. In the above form, select the provider in which you have the account. If your provider cannot be found in the list, then select Other from the list, and type the mail server name and the port used to connect to the server.
  2. Then, enter your user ID (complete mail address of the provider) and the password used to connect to the server.
  3. (Optional) Enter the display name which will be shown in the recipient's display.
  4. (Optional) Enter the Reply To address to which the recipient has to reply.
  5. Type the recipient's address at the Add Recipient space provided, and click the Add button to add the recipient to the list. Add more recipient mail addresses, if required.
  6. Finally, if the server requires secured connection, then select the Use Secured Connection checkbox.
  7. Click the Save button to save the settings temporarily till the new message is sent. The form will be closed and the previous form will be activated.

Finally, click on the Send button to send the mail message.

Clarifications

In case of any questions, or suggestions to improve the project, feel free to contact me at "shridhar_tl@ymail.com".

History

No updates so far.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

SHRIDHAR TL

Software Developer

India India

Member

Completed B.Com(CS) at DGVC and GNIIT Software Engineering at NIIT. Resident at Chennai and working as a Software Engineer.

 Language / Technology :

C#, ADO.NET, ASP.NET, ASP, PHP, XML, Java, J2EE, HTML, Javascript, VB Script, C++, MS SQL Server, SSRS, MySql, Oracle, Oracle Forms Development, Windows, Linux.

Click here to view other articles.

Mail Me at:  shridhar_tl@ymail.com

Visit my Site:  www.iCodeIt.in



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionWhat if the attach file is 5MB? I tried and it seems failed to send the mail. Pinmembersmilewei5:54 29 Aug '11  
AnswerRe: What if the attach file is 5MB? I tried and it seems failed to send the mail. PinmemberSHRIDHAR TL6:13 15 Nov '11  
GeneralRe: What if the attach file is 5MB? I tried and it seems failed to send the mail. Pinmembersmilewei19:32 15 Nov '11  
QuestionWorks fine on VS2010 PinmemberWrangly21:17 9 Aug '11  
QuestionGoto???? PinmemberPtitnorm5:19 22 May '09  
GeneralDemo Link Pinmemberfwsouthern16:12 6 Aug '08  
GeneralDemo Link PinmemberSHRIDHAR TL21:50 6 Aug '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 6 Aug 2008
Article Copyright 2008 by SHRIDHAR TL
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid