UML R E H P: Epresentation Mail Andler Roject
UML R E H P: Epresentation Mail Andler Roject
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)
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:
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.