html5中文学习网

您的位置: 首页 > 网络编程 > PHP编程 » 正文

outlook发送邮件:PHP 发送 outlook 约会邮件_PHP教程_编程技术

[ ] 已经帮助:人解决问题
  1. <?php 
  2. $to = "other@xxxx.net"
  3. $from = "me@xxxx.net"
  4. $subj = "my test subject"
  5. $msg = "this is the email body"
  6. $header = "From: " . $from . "/r/n" . 
  7. "MIME-Version: 1.0/r/n" . 
  8. "Content-Type: text/calendar;method=REQUEST"
  9. $txt_msg = "this is my text message, to be attached/r/n" . 
  10. "not much to it, eh."
  11. //Various ways to creat a new, random UID 
  12. $cal_uid = "{" . uniqid(mt_rand(), true) . "}"
  13. $cal_uid = "{" . date('Ymd').'T'.date('His')."-".rand()."@mydomain.com}"
  14. $cal_uid = com_create_guid(); 
  15. $cal_msg = 
  16. "BEGIN:VCALENDAR 
  17. PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN 
  18. VERSION:2.0 
  19. METHOD:REQUEST 
  20. BEGIN:VEVENT 
  21. ORGANIZER:MAILTO:name 
  22. DTSTART:20090901T170000Z 
  23. DTEND:20090901T035959Z 
  24. UID:" . $cal_uid . " 
  25. LOCATION:my meeting location 
  26. TRANSP:OPAQUE 
  27. SEQUENCE:0 
  28. DTSTAMP:20060309T045649Z 
  29. CATEGORIES:Meeting 
  30. DESCRIPTION:meeting description, line 1 of 2./nline 2 of 2./n/n 
  31. SUMMARY:meeting subject 
  32. PRIORITY:5 
  33. X-MICROSOFT-CDO-IMPORTANCE:1 
  34. CLASS:PUBLIC 
  35. BEGIN:VALARM 
  36. TRIGGER:-PT3D 
  37. ACTION:DISPLAY 
  38. DESCRIPTION:Reminder 
  39. END:VALARM 
  40. BEGIN:VTIMEZONE 
  41. TZID:US/Central 
  42. END:VTIMEZONE 
  43. END:VEVENT 
  44. END:VCALENDAR"; 
  45. if (mail($to$subj$cal_msg$header"")) { 
  46. echo "test email sent"
  47. else { 
  48. echo "test email failed"
  49. ?>  
本文链接http://www.cxybl.com/html/wlbc/Php/20130319/37246.html
RM4HTML5中文学习网 - HTML5先行者学习网
RM4HTML5中文学习网 - HTML5先行者学习网
(责任编辑:)
推荐书籍
推荐资讯
关于HTML5先行者 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助