SendFriend
Magento\SendFriend\Model\SendFriend
What it does
This class handles the 'Email to a Friend' functionality in Magento 2, allowing customers to share product information via email.
Developers use this class to send product recommendations, validate sender/recipient data, and enforce rate limiting to prevent spam by tracking sends via cookies or IP addresses.
It manages the entire workflow from validation through email delivery using Magento's template system.
Public Methods
- send()
- validate()
- setRecipients()
- getRecipients()
- setProduct()
- getProduct()
- setSender()
- getSender()
- getMaxSendsToFriend()
- getMaxRecipients()
- canEmailToFriend()
- isExceedLimit()
- getSentCount()