Slide môn học PHP session 8 handling email with PHP

17 261 0
Slide môn học PHP session 8 handling email with PHP

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Handling Email with PHP Session 19 Review      Cookies provide us with the functionality of storing temporary Web user information Sessions enable Web sites store user requests and information on the Web Session library enables:  Creation  Serialization  Storage of session data php.ini file located under the usr/local/php4/lib directory Sessions enable PHP store user information on the Web server PHP / Session 19 / Slide of 17 Objectives   Send Mails Use attachments with mails PHP / Session 19 / Slide of 17 Email   Performs email sending process using the mail() function mail() function accepts three arguments Those are:      Recipient’s email address Subject of the email Body of the email Recipient’s email address is compulsory Other arguments are optional Local mail server for mail() function is specified in the php.ini configuration file PHP / Session 19 / Slide of 17 php.ini file  The section for mail function in the php.ini file look like: PHP / Session 19 / Slide of 17 Sending Email  Syntax for the mail() function is: mail(string to,string subject,string message [, string additional_headers]) Where,    string to – Specifies the receiver’s mail addresses string subject – Specifies the subject for the email 19 / Slide of 17 string message – Specifies the messages that willPHPbe/ Session written in the mail Sending email to a single user - I  For example, to send a mail using the mail() function Here, the mail is sent to john@bluemountain.com from tom@bluemountain.com PHP / Session 19 / Slide of 17 Sending email to multiple users I  For example, to send a mail to multiple recipients using mail() function Here, the mail is sent to all the users mentioned in the receiver’s list from samson@bluemountain.com PHP / Session 19 / Slide 10 of 17 Using attachment with email    An attachment is any text or graphics file sends with the email Uses an additional parameter, header, with the mail() function Syntax for the mail function with additional parameter is: mail(string to, string subject, string message [, string additional_headers[, string additional_parameters]]) Where,      string to – Specifies the receiver’s mail addresses string subject – Specifies the subject for the email string message – Specifies the messages that will be written in the mail string additional_headers – Specifies the mail sender’s address string additional_parameters – Specifies the headers those are set for attaching a file with the email PHP / Session 19 / Slide 11 of 17 Example for using attachment with email - I  For example, to send an email with an attachment

Ngày đăng: 30/11/2016, 22:12

Từ khóa liên quan

Mục lục

  • Handling Email with PHP

  • Slide 2

  • Objectives

  • Email

  • php.ini file

  • Sending Email

  • Sending email to a single user - I

  • Sending email to a single user - II

  • Sending email to multiple users - I

  • Sending email to multiple users - II

  • Using attachment with email

  • Example for using attachment with email - I

  • Example for using attachment with email - II

  • Example for using attachment with email - III

  • Example for using attachment with email - IV

  • Executing the codes

  • Summary

Tài liệu cùng người dùng

Tài liệu liên quan