This is a Lightning Web Component that allows users to select a contact, then an attachment from a record to send in an email.
To use this component in your Salesforce org, you can either:
-
Install the unmanaged package from the AppExchange: link to package
-
Clone the repository and deploy the code to your org using the Salesforce CLI:
git clone https://github.com/guffelman/send-attachment-to-contact.git
cd send-attachment-to-contact
sfdx force:source:deploy -p force-app/main/default
To use this component, add it to a Lightning page or record page in your org. The component will display a form with a lookup field to select a contact and a dropdown to select an attachment from the record. Once a contact and attachment are selected, click the "Send Email" button to send an email with the attachment to the selected contact.
If you find a bug or would like to contribute to this component, please open an issue or pull request on the GitHub repository.