I am sending calendar invites using Laravel's mail api.
The calendar looks good on gmail but shows an attachment on outlook instead of proper calendar invitation.
Gmail's output:
while on outlook it seems to be attachment:
I am creating a file with name invite.ics and I put the content inside the invite.ics file, I attach the file before sending.
\Mail::send('emailTemplates.dummy', ['emailBody'=>$row->body], function(Message $message) use ($to,$subject,$attachments,$cc, $body, $calendar_invitation, $companyEmail)
{
$message->from($companyEmail, '');
$message->replyTo($companyEmail, 'Email Agent Meetings');
$message->to($to, '')->subject($subject);
$file = fopen("invite.ics","w");
echo fwrite($file,$calendar_invitation);
fclose($file);
$message->attach('invite.ics', array('mime' => "text/calendar"));
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tHE82u
via IFTTT
Aucun commentaire:
Enregistrer un commentaire