PHP sends Outlook tryst messages

Source: Internet
Author: User
PHP sends Outlook appointment messages

Note: I haven't verified it yet, and I've seen it in a post.

?

? $to? = "[email protected]";?

? $from = "[email protected]";?

? $SUBJ = "my test subject";?

? $msg? = "This is the email body";?

?

? $header = "From:". $from. "\ r \ n".?

? ? ? ? ? "Mime-version:1.0\r\n".?

? ? ? ? ? ?" Content-type:text/calendar;method=request ";?

?

? $txt _msg = "This was my text message, to be attached\r\n".?

? ? ? ? ? ? ?" Not much to it, eh. ";?

?

? Various ways to creat a new, random UID?

? $cal _uid = "{". Uniqid (Mt_rand (), true). "}";?

? $cal _uid = "{". Date (' Ymd '). ' T '. Date (' his '). " -". Rand ()." @mydomain. com} ";?

? $cal _uid = Com_create_guid ();?

?

? $cal _msg =?

"Begin:vcalendar?"

Prodid:-//microsoft Corporation//outlook 11.0 mimedir//en?

Version:2.0?

Method:request?

Begin:vevent?

ORGANIZER:MAILTO:name?

dtstart:20090901t170000z?

dtend:20090901t035959z?

UID: ". $cal _uid. "

Location:my meeting Location?

Transp:opaque?

Sequence:0?

dtstamp:20060309t045649z?

Categories:meeting?

Description:meeting DESCRIPTION, line 1 of 2.\nline 2 of 2.\n\n?

Summary:meeting subject?

Priority:5?

X-microsoft-cdo-importance:1?

Class:public?

Begin:valarm?

TRIGGER:-P T3d?

Action:display?

Description:reminder?

End:valarm?

Begin:vtimezone?

Tzid:us/central?

End:vtimezone?

End:vevent?

End:vcalendar ";?

? if (Mail ($to, $SUBJ, $cal _msg, $header, "")) {?

? ? echo "test email sent";?

? } else {?

? ? echo "test email failed";?

? }?

??>

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.