Search

Hi All

I have a client who wants to white label their site for clients. The site will need to send emails which are branded with the clients branding and which come from the clients' email address.

Has anyone managed to set up ETM to send from multiple senders?

The only alternative I can think of at the moment is to build an extension which circumvents Symphony's native email API (using the Mandril API), but I'd like to avoid this if possible.

Thanks

In the past I have added the ability to set a "From Name" and "From Email". But for this to work:

  • The email server must allow fake senders. (Normally it shouldn't.)
  • If there are special settings for the sending domains in the DNS (like SPF or Domain Keys), you will need to add new stuff to these settings.

Since I myself have full control over everything, it can work. But if you have not, I would advice to not do it like this. (And this is the reason why this feature has not been merged into the main repo.)

But you should be able to hack the ETM even more and add host and connection settings as well. The Core Email API allows to set these properties on the fly, here is some example code from the ENM extension:

$email = Email::create('smtp');
$email->setSenderName($about['smtp']['from_name']);
$email->setSenderEmailAddress($about['smtp']['from_address']);
$email->setHost($about['smtp']['host']);
$email->setPort($about['smtp']['port']);
$email->setSecure($about['smtp']['secure']);
if($about['smtp']['auth'] == 1){
    $email->setAuth(true);
    $email->setUser($about['smtp']['username']);
    $email->setPass($about['smtp']['password']);
}

My "hack" should be a good start. Since I don't want it to be too public (or start any discussions about it), please drop me a line and I will send you something. (You know where to find my email address, don't you?)

Thanks Michael, have emailed

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details