MarcUK1603 Posted August 16, 2021 Share Posted August 16, 2021 (edited) Hi there, Is there a way to automatically open default email client with pre-populated content from a button on 7.1? I'm guessing it may need J query injection, as it won't work by simply adding pre-populated content on email linked button unless there is an email address in the field. But if you want user to share they they'll need 'To:' blank so they can add in email recipient's address themselves. Any help appreciated. Thanks Marc Edited August 16, 2021 by MarcUK1603 Link to comment
Solution iamdavehart Posted August 16, 2021 Solution Share Posted August 16, 2021 the mailto link protocol accepts subject, cc, bcc and body parameters. in addition according to the mailto protocol specification you don't have to provide an address. it works without one, so you can just add a link in the button that has a link like this (%20 is an encoded space, you have "percent encode" your values. you can use an online encoder for that if you want). mailto:?subject=Hello&body=Hello%20World! if you do it via the link editor in squarespace it doesn't seem to like it without an email (as you've found out), so I'd just type it in manually. Does seem to cause some odd behaviour with the editor though, sqs probably require one so it breaks some of their validation. it does work though! Dave Hart. Software/Technology Consultant living in London. buymeacoffee Link to comment
MarcUK1603 Posted August 16, 2021 Author Share Posted August 16, 2021 Thanks for quick reply. That's sorted it. Appreciate help. Link to comment
MarcUK1603 Posted December 6, 2022 Author Share Posted December 6, 2022 I've revisited this for another site that is on Fluid, and it no longer seems to work. Is there another workaround for auto-launching a users email browser with a blank mailto: and prefilled subject/body copy so that links to a site's page can be shared with family/friends...? Thanks Marc Link to comment
wonderpiece Posted June 4 Share Posted June 4 (edited) bumping this one in case anyone has advice! thank you! having same issue as above member Edited June 4 by wonderpiece Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment