Search code examples
emailsmtpsmtp-auth

Smtp send email with another address


Hi all I have a site where if i want to send an email I have to set the smtp with this configuration: Enable Advanced Smtp Yes
Auth Mode Login
Username [email protected]
Password password
Smtp host smtp.myserver.com
Smtp port 465
Use SSL Yes

If I want to send with my smtp settings mail from another address like [email protected] how can I do that? Because my client don't want to see my domain when receive the email but another email. Is possible?


Solution

  • All you need is an SMTP server with relaying. if smtp.myserver.com has relaying, than you can use a variety of languages. YOu need to modify the >MAIL From: parameter in any which of those languages.

    For magento, modify: “/magento/app/code/core/Mage/Core/Model/Email.php"

    then under the public function send() function you need to modify:

        ->setFrom($this->getFromEmail(), $this->getFromName())
    

    and use

       ->setFrom("[email protected]")