Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9071667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:58:07+00:00 2026-06-16T17:58:07+00:00

I am trying to send a calendar request mail through my php code. I

  • 0

I am trying to send a calendar request mail through my php code. I got the mail along with the calendar. But I have a problem in the start date. How to configure the start date according to Gulf Standard Time. Now I am getting according to GMT, though I did not mention anywhere. That means in short, if I will send a request on 7am then in the start date it will show 11 am.
My code is like:

$dtstart = $start_date_conf;

$dtend=$end_date_conf;

$todaystamp = date("Ymd\THis\Z");

//Create unique identifier
$cal_uid = date('Ymd').'T'.date('His')."-".rand()."@fugenx.com";

//Create Mime Boundry
$mime_boundary = "----Bespot Meeting Booking----".md5(time());

//Create Email Headers
$headers = "From: ".$from_name." <".$from_address.">\n";
$headers .= "Reply-To: ".$from_name." <".$from_address.">\n";

$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";
$headers .= "Content-class: urn:content-classes:calendarmessage\n";

//Create Email Body (HTML)
$message .= "--$mime_boundary\n";
$message .= "Content-Type: text/html; charset=UTF-8\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";

$message .= "<html>\n";
$message .= "<body>\n";
$message .= '<p>'.$messagess.'</p>';
$message .= '<p></p><p></p>';
$message .= '<p><b>Thanks & Regards,:</b></p>';
$message .= '<p>'.$full_name.'</p>';
$message .= '<p>'.$full_address.'</p>';
$message .= '<p>'.$email_address.'</p>';
$message .= '<p>'.$mobile_number.'</p>';

$message .= "</body>\n";
$message .= "</html>\n";
$message .= "--$mime_boundary\n";

//Create ICAL Content (Google rfc 2445 for details and examples of usage) 
$ical =    "BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER:MAILTO:".$from_address."
DTSTART:".$dtstart."
DTEND:".$dtend."
LOCATION:".$meeting_location."
TRANSP:OPAQUE
SEQUENCE:0
UID:".$cal_uid."
DTSTAMP:".$todaystamp."
DESCRIPTION:".$meeting_description."
SUMMARY:".$subject."
PRIORITY:5
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR";   


$message .= "Content-Type: text/calendar;method=REQUEST;charset=utf-8\n";

//$message .= "Content-Type: text/calendar;name=\"meeting.ics\";method=REQUEST\n";
$message .= "Content-Transfer-Encoding: 8bit\n\n";
$message .= $ical;            

//SEND MAIL
$mail_sent = @mail( $email, $subject, $message, $headers );
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:58:08+00:00Added an answer on June 16, 2026 at 5:58 pm

    see RFC5545, you need to add a vtimezone component to refer the TZID to it

    Parameter Name: TZID

    This parameter MUST be specified on the "DTSTART",
    "DTEND", "DUE", "EXDATE", and "RDATE" properties when either a
    DATE-TIME or TIME value type is specified and when the value is
    neither a UTC or a "floating" time. Failure to include and follow VTIMEZONE definitions in iCalendar objects may lead to inconsistent understanding of the local time
    at any given location.

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
    METHOD:REQUEST
    CALSCALE:GREGORIAN
    BEGIN:VTIMEZONE
    TZID:Asia/Qatar
    BEGIN:STANDARD
    DTSTART:20081102T090000
    TZOFFSETFROM:+0300
    TZOFFSETTO:+0300
    TZNAME:CST
    END:STANDARD
    END:VTIMEZONE
    BEGIN:VEVENT
    ORGANIZER:MAILTO:mailto@organiser.net
    DTSTART;TZID=Asia/Qatar:20130104T090000
    DTEND;TZID=Asia/Qatar:20130104T100000
    LOCATION:meeting_location
    TRANSP:OPAQUE
    SEQUENCE:0
    UID:cal_uid
    DTSTAMP:20130104T224617Z
    DESCRIPTION:meeting_description
    SUMMARY:subject
    PRIORITY:5
    CLASS:PUBLIC
    END:VEVENT
    END:VCALENDAR
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to send a complex type between two systems that have the same code
I`m trying to send e-mail via c# and use the following code: public static
Im trying to send a mail from a asp.net script, but im getting this
Am trying to send HTTP Get request via C#. But it seems not working.
I´m trying to send an email through gmail using this code: MailMessage msg =
Trying to send a PHP email the easy way but I cannot work out
trying to send Arabic text from android to PHP file using the code below
am trying send an array to php file using $_POST ,still always getting an
im trying to send rest api Users.getLoggedInUser i have all the secret session and
I am trying to send extras through an intent to a service which then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.