If you have installed Aschroder SMTP module and happen to have an Amazon SMTP server and you’ve noticed that only email a friend does not send mail then the problem is with the SMTP server. If you check your error log you might notice an error like “Message rejected: Email address is not verified.” The solution is to localize in app/code/local/Mage/Sendfriend/Model/Sendfriend.php or overwrite in a custom module the model Mage_Sendfriend_Model_Sendfriend editing it in the following way: go to send() function and comment out
$sender = array( 'name' => $this->_getHelper()->htmlEscape($this->getSender()->getName()), 'email' => $this->_getHelper()->htmlEscape($this->getSender()->getEmail()) );
and add instead of it
$sender = array( 'name' => Mage::getStoreConfig('general/store_information/name'), 'email' => Mage::getStoreConfig('trans_email/ident_general/email'); ); // in the message you can speicify the actual sender $message=$message."<br/> Message sent by: ".$this->getSender()->getName()." ".$this->getSender()->getEmail();
In this case the sender is Mage::getStoreConfig(‘trans_email/ident_general/email’) is the site general contact mail which you can replace with any other config mail. I suppose the mail has the same domain as your site. Now the amazon server will let you mail to friends because the sender domain is your one!
For the novice: Mage_Sendfriend_Model_Sendfriend you can find in app/code/core/Mage/Sendfriend/Model