Hello,
I have below code for my calender invitation.

<?php
$message="

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20130901T121000Z
DTEND:20130901T131000Z
DTSTAMP:20110525T075116Z
ORGANIZER;CN=From Name:mailto:from email id
UID:12345678
ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP= TRUE;CN=Sample:emailaddress@testemail.com
DESCRIPTION:Test the first invite
LOCATION: Test Location
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Test the first icalendar invitation
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR";

/*headers*/
$headers = "From: From Name <From Mail>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/calendar; method=REQUEST;\n";
$headers .= '        charset="UTF-8"';
$headers .= "\n";
$headers .= "Content-Transfer-Encoding: 7bit";

/*mail content*/
$subject = "Meeting Subject";
$subject = html_entity_decode($subject, ENT_QUOTES, 'UTF-8');

/*mail send*/
if(mail("emailaddress@testemail.com", $subject, $message, $headers))

{
    echo "Your request has been sent";
}else {
    echo "error";
}
?>

How can I send multiple invitation from this ?
For ex: one invitation for event1 and another for event2
but both from 1 mail only.
Please help me in this.

Please correct me if am wrong in this

Member Avatar for LastMitch

How can I send multiple invitation from this ? For ex: one invitation for event1 and another for event2 but both from 1 mail only. Please help me in this.

@Priti_P

Use one of these examples:

http://php.net/manual/en/function.mail.php

I am curious why you wrote the code in that format because you are missing some essential info.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.