Advertisement
Guest User

Untitled

a guest
Sep 14th, 2015
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. $text="
  2. BEGIN:VCALENDAR
  3. VERSION:1.0
  4. BEGIN:VEVENT
  5. CATEGORIES:MEETING
  6. STATUS:TENTATIVE
  7. DTSTART:".$startDateTime."
  8. DTEND:".$endDateTime."
  9. SUMMARY:Interview for the candidate".$cname."
  10. DESCRIPTION:".$message."
  11. CLASS:PRIVATE
  12. END:VEVENT
  13. END:VCALENDAR";
  14.  
  15. $mail->SetFrom('xxxxxx@yahoo.com', 'xxxx');
  16. $mail->IsSMTP();
  17. $mail->Host = "smtp.mail.yahoo.com";
  18.  
  19. $mail->SMTPAuth = true;
  20. $mail->Username = 'xxxxxxxx@yahoo.com';
  21. $mail->Password = 'xxxxx';
  22.  
  23.  
  24. $mail->AddAddress($addresses[$i]);
  25. $mail->Subject = "Interview schedule of Candidate";
  26.  
  27. $headers = "From: Sendern";
  28. $headers .= "Reply-To: xxxxxx@yahoo.comn";
  29. $headers .= "MIME-Version: 1.0n";
  30. $headers .= "Content-Type: text/calendar; method=REQUEST; charset=utf-8n";
  31. $headers .= "Content-Transfer-Encoding: 8bitn";
  32. $headers .= "Content-class: urn:content-classes:calendarmessagen";
  33. $mail->Body=$body;
  34.  
  35. if(!$mail->Send($headers,$body))
  36. {
  37. echo "Mailer Error: " . $mail->ErrorInfo;
  38. }
  39. else
  40. {
  41. echo "Message sent!";
  42. }
  43.  
  44. $mail->IsHTML(FALSE);
  45.  
  46. $mail->Subject = $name;
  47. $mail->Body = $description;
  48. $mail->AltBody = $body; // in your case once more the $text string
  49. $mail->Ical = $message; // ical format, in your case $text string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement