Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gmail stripping ICS link #182

Open
dathwa opened this issue Jan 24, 2024 · 7 comments
Open

Gmail stripping ICS link #182

dathwa opened this issue Jan 24, 2024 · 7 comments
Labels

Comments

@dathwa
Copy link

dathwa commented Jan 24, 2024

Hello.

PHP Version: 8.0
Package version: 1.8.5
Chrome browser.
Gmail is stripping out the ICS link.
I'm seeing this in the "view original":

<a href=3D"data:text/calendar;charset=3Dutf8;b=
ase64,QkVHSU46VkNBTEVOREFSDQpWRVJTSU9OOjIuMA0KUFJPRElEOlNwYXRpZSBjYWxlbmRhc=
i1saW5rcw0KQkVHSU46VkVWRU5UDQpVSUQ6MDU3MjhkYWE4YjM5MDI3YWRkYzM0ZGU4N2E3Njlh=
NTYNClNVTU1BUlk6MjAyNCBIb29rdXANCkRUU1RBTVA6MjAyNDEyMDFUMDkwMDAwWg0KRFRTVEF=
SVDoyMDI0MTIwMVQwOTAwMDBaDQpEVEVORDoyMDI0MTIwMVQxNzAwMDBaDQpFTkQ6VkVWRU5UDQ=
pFTkQ6VkNBTEVOREFS" target=3D"_blank" rel=3D"noopener">ICS (for iCal & Outl=
ook)</a>

The links work OK when i post them to the page (in the same chrome browser.
Anything I can do about this?
Thank-you.

@dathwa dathwa added the bug label Jan 24, 2024
@spatie-bot
Copy link

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

@dathwa
Copy link
Author

dathwa commented May 27, 2024

Please keep this open. Looking forward to a human response. Thank-you.

@alies-dev
Copy link
Collaborator

alies-dev commented May 27, 2024

@dathwa
I see your code contains 3D
image

Probably you use some HTML encoding tools or char espacping that breaks the URL

@Dylan-Buth
Copy link

We're running into the same problem. We haven't test it yet, but this is what ChatGPT had to say about it.

The issue you’re facing with the Spatie calendar-links package generating an ics() link that is not clickable in Gmail is likely due to the use of a data: URL. Gmail does not handle data: URLs well, especially for attachments like ICS files.

A more reliable approach is to generate the ICS file content, save it to a publicly accessible location (like your server or a cloud storage), and then provide a direct link to that file in the email.

Steps to Solve the Issue

  1. Generate the ICS content using Spatie’s calendar-links package.
  2. Save the ICS content to a file.
  3. Provide a public URL to the saved ICS file in the email.

@Dylan-Buth
Copy link

Please keep this open. Looking forward to a human response. Thank-you.

I'd also like this to be re-opened.

@alies-dev alies-dev reopened this May 29, 2024
@dathwa
Copy link
Author

dathwa commented May 29, 2024

I found this: https://stackoverflow.com/questions/4016067/whats-a-3d-doing-in-this-html

It could be an environment issue.
I am using octoberCMS/Laravel with the Mall plugin.
I'll do more digging.

@Dylan-Buth
Copy link

We decided to just add an api endpoint that will return the ics data, and link to that in the email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants