You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm doing a project with Laravel and I want to make links to create appointments to Google Calendar, Outlook, etc. So, this works perfect, but when I want to attach the link->ics() into a link or create a ics file to be attached in the mail, it doesn't work.
For example. If I make this:
var $example = $link->ics();
This generate the "data:text/calendar;charset=utf8;base64,...". So, if I put this in a a href="" attribute, when I click from outlook Windows ask me how can open this, because Windows don't know how to open.
And, if I put the $link->ics() in a file using file_put_contents($filepath, $link->ics() and then I attach to the mail like this:
Hi!
I'm doing a project with Laravel and I want to make links to create appointments to Google Calendar, Outlook, etc. So, this works perfect, but when I want to attach the link->ics() into a link or create a ics file to be attached in the mail, it doesn't work.
For example. If I make this:
var $example = $link->ics();
This generate the "data:text/calendar;charset=utf8;base64,...". So, if I put this in a
a href=""
attribute, when I click from outlook Windows ask me how can open this, because Windows don't know how to open.And, if I put the $link->ics() in a file using
file_put_contents($filepath, $link->ics()
and then I attach to the mail like this:Mail->send(new MailTemplate(), function($message) use ($filename) { $message->attachFromStorage($filename,'example.ics', ['mime' => 'text/calendar']); });
And I tried this:
`$file_to_attach = 'data:text/calendar;charset=utf8;base64,QkVHSU4...'
Mail->send(new MailTemplate(), function($message) use ($file_to_attach )
{
$message->attachData($file_to_attach ,'example.ics');
});`
And this:
`$file_to_attach = 'data:text/calendar;charset=utf8;base64,QkVHSU4...'
Mail->send(new MailTemplate(), function($message) use ($file_to_attach )
{
$message->attach($file_to_attach , ['as' => 'meeting.ics','mime' => 'text/calendar']);
});`
And sent the mail but in Outlook don't show me any attached file.
What could be happen?
The text was updated successfully, but these errors were encountered: