程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> 網上找到的兩個PHP發送郵件的例子,很不錯,貼出來給初學者參考吧不知道是否有兄弟曾貼過,呵呵2

網上找到的兩個PHP發送郵件的例子,很不錯,貼出來給初學者參考吧不知道是否有兄弟曾貼過,呵呵2

編輯:關於PHP編程

Advanced Example Here we will show the full capabilities of the PHP mail function. PHP Code: "; $recipient = "Kris Arndt ,[email protected]"; $subject = "Testing the mail function"; $message = "Hello! This is the body of the message. "; $extra = "From: [email protected] Reply-To: [email protected] "; mail ($recipient, $subject, $message, $extra); echo "Sending mail..."; echo ""; ?> We send an email to two people this time, by putting two email addresses in the recipient field and separating them with commas. The fourth parameter holds extra headers for the email. We specify who the email was from and who the recipient should reply to. When entering multiple headers, separate them with the line feed and new line combination ( ).

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved