0% found this document useful (0 votes)
159 views7 pages

UML R E H P: Epresentation Mail Andler Roject

This document summarizes an email handler project created by three students. The email handler allows a user to send emails with or without attachments by using common email protocols and classes in .NET. It contains controls for the recipient, sender, subject, message body, and attachments. The email handler uses the SmtpClient class to send emails through an SMTP server, with examples provided for Gmail, Yahoo, and Hotmail. Instructions are included for installing and configuring an SMTP server on a local machine.

Uploaded by

talhareal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
159 views7 pages

UML R E H P: Epresentation Mail Andler Roject

This document summarizes an email handler project created by three students. The email handler allows a user to send emails with or without attachments by using common email protocols and classes in .NET. It contains controls for the recipient, sender, subject, message body, and attachments. The email handler uses the SmtpClient class to send emails through an SMTP server, with examples provided for Gmail, Yahoo, and Hotmail. Instructions are included for installing and configuring an SMTP server on a local machine.

Uploaded by

talhareal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

UML REPRESENTATION Email Handler Project

Created By: MUNAWAR ALI SHAIKH MUHAMMAD TALHA NOOR MEER WAICE KHAN Submitted To: SIR ZAIN ABBAS

(Class Roll # 50, EP # EP094951) (Class Roll # 49, EP # EP094950) (Class Roll # 27, EP # EP094927)

Documentation of Email Handler Project:


In order to make the project, I have implemented an Email Handler, this email handler is able to send emails. The email handler can email files with and without attachment. This email Handler is able to attach a number of files, using this software, one can email a number of files to any user. Elements of Program: Email Handler contains two radio buttons in order to control the mails. If first radio button is clicked, it makes enable the first part and disables the second part and the second radio button makes disable the first part and enables the second part. It contains Mail To textbox, Mail From and Subject textbox. And also contains a Combo Box to change the option of emails to different servers. It contains a rich text box to get Message from the sender. And attachment button to attach a number of files of all extensions. It also contains a send button in order to send that email. Some labels are used to guide the user in order to use the software. Sending a Plain Email: In order to send a plain text email, we can use an SMTP protocol, containing email to, email from , email Body, and email subject, some other properties are Cc and Bcc but we have not use them in our program. Mail Message Class: MailMessage is a class, which collects information about the senders email. One of its constructors is for getting information about the senders email. Where MailMessages object.Attachments.Add method gets Attachment type of object as parameter, and attaches the file for the mail. MailMessage mail = new MailMessage(string from,string to,string subject,string body); Attachment attached = new Attachment(attach, MediaTypeNames.Application.Octet); mail.Attachments.Add(attached); Attachment allows you to attach files, streams, or text to an e-mail message. Where MediaTypeNames.Application.Octet is used to attach files of all extensions, where its other elements are .Pdf, .Zip etc in order to restrict the attachment. SMTP Client: The SmtpClient class is used to send e-mail to any SMTP server. It depends upon the MailMessage, means what is going to mail at where. This SmtpClient class has no such method in order to finalize, so in the application we must call Dispose to explicitly and freely send the mail message. It has two very important

properties, the Host property and port property establishes connection to any server and send a graceful message. The SmtpClient class provides the functionality required to send email using an SMTP server. This class requires the details of SMTP server to be used. Therefore I have used in my program: client.Host = AnyOtherHost.Text; client.Port = Convert.ToInt32(AnyOtherPort.Text); You can also write: SmtpClient client = new mtpClient(Properties.Settings.Default.SMTPAddress); If you have installed the server and setted it successfully. The installation and setting process is also described in the presentation. Simple Mail Transfer Protocol: The .NET framework 2.0 or greater, provides System.Net.Mail class, to send electronic mails. The three key classes are SmtpClient, MailMessage and Attachment. The System.Net.Mail uses SMTP protocol in order to send emails from a server. Simple Mail Transport Protocol (SMTP) is an standard or rule for sending email on the Internet. It is used to send email messages to one or more recipients, including carbon copied and blind carbon copied recipients, using an SMTP server. This server then relays the message to the correct destinations using the domain names from the email addresses specified. When sending email using an SmtpClient object, the object must require to communicate with an SMTP server. This SMTP server may connected to a local network, such as a Microsoft Exchange server that is able to send SMTP email, or a server on the Internet, such as the SMTP server provided by most Internet Service Providers. The server to be used is configured in the Host property of the SmtpServer object. The property holds a string containing either the name or the IP address of the server. Where as the UseDefaultCredentials property is if set to be true, then the class will use the login details of the current user. And in our program it is false, so it does not use the login details of the current user. Sending Yahoo, Google and Live Mails: For the first radio button has been selected, or in order to send a yahoo mail, gmail or live mail, we have to use and remember their host and port numbers. These Host and Port numbers are important to send emails at yahoo, google and live: Gmail:

SMTP Host: smtp.gmail.com Port Number: 587 Yahoo: SMTP Host: smtp.mail.yahoo.com Port Number: 465 Hotmail: SMTP Host: smtp.mail.live.com Port Number: 25 Installation of the Server: In order to send a successful email, you have to establish or install a server through which you can send emails. In order to check that the SMTP mail server is installed on your computer, you have to apply the following steps: 1) Goto StartMenu and click Control Panel. 2) Click Add or Remove Programs. 3) Click Add/Remove Windows Components button. 4) Check whether or not the Internet Information Services (IIS) checkbox is checked. If it is checked then fine (your IIS is ON). Otherwise checked it and goto Next and install it using Window Xp cd.

5) In order to establish a server goto Internet Information Services by StartMenu > Run and type inetmsg in Run. You will get:

6) Right click Default SMTP Virtual Server there and go to Properties.

7) In the Access tab, click the Authentication button and check the Anonymous access check box. You will get:

8) Then press Ok. 9) In the Access tab, click the Relay button, in the Computers column, click Add then type the IP address of your system then press OK. You will get:

10) Click OK in the Relay Restriction window. 11) Click the Dilivery tab and click Advanced button. 12) In the Fully qualified domain name, write your computer name and click Check DNS, mostly it will be prefilled so just check the validity of DNS. 13) If the DNS is valid, click the most important part Smart host, and write the host number of your SMTP server and press OK.

You might also like