Skip to content
This repository was archived by the owner on Jun 4, 2018. It is now read-only.
This repository was archived by the owner on Jun 4, 2018. It is now read-only.

setDomainName issue #7

@outflux3

Description

@outflux3

Setting the domain name doesn't override something in the headers, mailgun still registers the sender as the domain that is entered in the module settings.

The only way i've been able to get the messages to register in the correct log is to change that domain in the module settings; otherwise if there is a mismatch, then it somehow sets the envelope sender as postmaster@ the domain entered;

i spent some time trying to figure this out, but have hit a dead end; When I print_r the wiremail instance, it does show the override for the domain, but then when i see the message in the mailgun log, it still has that envelope sender as the wrong domain. I tried adding a header like this:

$mail->header('Sender', $identity->email);

but that didn't work;

Also i noticed that the fromEmail would be blank and thought that might fix this so i added the method..

    /**
     * Overrides the fromEmail setting in config
     *
     * @param string $fromEmail
     */
    public function setFromEmail($fromEmail)
    {
        $this->fromEmail = $fromEmail;
    }

but that may be superfluous since this is not affecting the envelope sender.

i think the problem may be that this:
CURLOPT_URL => "{$this->apiUrl}{$this->domain}/messages",

$this->domain is not being overridden by the instance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions