resend / react-email

💌 Build and send emails using React
https://react.email
MIT License
13.05k stars 592 forks source link

The link element is not navigating the user to the appropriate href specified. #1507

Open abuzain432432 opened 3 weeks ago

abuzain432432 commented 3 weeks ago

Describe the Bug

I have specified the links in the footer, but I don't know why they are not working. This is the code. I am testing it in the Gmail client.

Which package is affected (leave empty if unsure)

@react-email/link

Link to the code that reproduces this issue

https://github.com/abuzain432432/React-Email-Bug-In-Link_Component

To Reproduce

  1. Set up a project with React Email:

    • Initialize a new project using React or Next.js.
    • Install the react-email package.
  2. Create an email template:

  3. Copy code from the linked repo to your project:

Expected Behavior

Clicking on social media links in the footer of the email should redirect to the specified URLs. For example, a Facebook link should take the user to a specific Facebook profile page, not to an unrelated or random URL.

What's your node version? (if relevant)

20

gabrielmfern commented 3 weeks ago

What happens when you click the URL? Does it redirect the user successfully, or does it not work at all?

My understanding here is that email clients, like Gmail, will generate some safe URL of theirs that redirects into your URL. Is that what you don't expect here? Because, beyond that, it seems to work fine.

abuzain432432 commented 3 weeks ago

When I click on the link it redirects me to a broken URL. I don't know why. in the actual case, it should redirect me to this URL https://twitter.com/MuuveGroup in Gmail client image in development preview image

gabrielmfern commented 2 weeks ago

Does it not work when you actually open the apparently broken URL either? Also, one more question, are you using Resend?

abuzain432432 commented 2 weeks ago

No, I am not using Resend I am using SandGrid, and answer to your first question "No, I am getting this" image

gabrielmfern commented 2 weeks ago

Could this be related to SendGrid's click tracking?