Set mail from address

@param string|array $from
@return $this
@throws \Magento\Framework\Exception\MailException
354142
public function setFrom($from)
    {
	$result = $this->_senderResolver->resolve($from, $this->getStoreId());
        $this->setSenderMail($result);
        $this->message->setFrom($result['email'], $result['name']);
        
        return $this;
    }
567662
public function setFrom($from = [])
    {
        $this->from = $from;
        $this->debug->debug(__FUNCTION__, 'setFrom: ', $this->from);
    }
160884
public function from($from)
    {
        $pos = strpos($from, ' ');
        if (false !== $pos) {
            $this->table = substr($from, 0, $pos);
        } else {
            $this->table = $from;
        }
        $this->fullTable = $this->db->getTable($this->table);
        return $this->add('from', $this->db->getTable($from));
    }
352757
public function from($from = NULL) {
		if ($from !== NULL) {
			$from = intval($from);
		}

		$this->from = intval($from);
		return $this;
	}
268340
public function alias($from, $to = null)
	{
		if (is_array($from))
		{
			$this->aliases = array_merge($this->aliases, $from);

			return $this;
		}

		$this->aliases[$from] = $to;
		$this->cache->set($from, $to);
	}
51078
public function from($from, $name = null)
    {
        $this->from = ($name !== null) ? (ucwords($name) . " <{$from}>") : $from;

        return $this;
    }
716035
public function setReplyToAddress(string $address, array $variables = []): self
    {
        $this->addRecipient('h:reply-to', $address, $variables);

        return $this;
    }
1343233
protected function sendEmail(array $recipient, array $from, $subject, $bodyHTML = '', $bodyPlain = '', array $replyTo = NULL)
    {

        if ($replyTo == NULL) {
            $replyTo = $from;
        }
        $mail = GeneralUtility::makeInstance(MailMessage::class);
        $mail
            ->setTo($recipient)
            ->setFrom($from)
            ->setReplyTo($replyTo)
            ->setSubject($subject);

        if ($bodyHTML !== '' && $bodyHTML !== NULL ) {
            $mail->addPart($bodyHTML, 'text/html');
        }
        if ($bodyPlain !== '' && $bodyPlain !== NULL ) {
            $mail->addPart($bodyPlain, 'text/plain');
        }

        return $mail->send();
    }
1300416
public function from($mail, $name)
    {
        $this->_sender_name = $name;
        $this->_sender_mail = $mail;

        return $this;
    }
1163255
public function mail($from)
    {
        if ($this->_helo == false) {
            throw new SMTPException(__('Must call EHLO (or HELO) before calling MAIL'));
        } elseif ($this->_mail !== false) {
            throw new SMTPException(__('Only one call to MAIL may be made at a time.'));
        }

        $this->_send('MAIL FROM:<' . $from . '>');
        $this->_expect(250, 300);

        $this->_from = $from;
        $this->_mail = true;
        $this->_rcpt = false;
        $this->_data = false;
    }
945680
public function send(array $from, array $addresses, $message, $options = []) {
        $this->mailer->setFrom($from['email'], $from['name']);

        $this->createAddresses($addresses);

        if ($options['subject']) {
            $this->mailer->Subject = $options['subject'];
        }

        $body = '';
        if (isset($options['template'])) {
            $body = $this->createFromTemplate($message, $options['template']);
        } else {
            if (!is_array($message)) {
                $body = $message;
            }
        }

        $this->mailer->AllowEmpty = true;

        $this->mailer->Body = $body;

        if (isset($options['attachments'])) {
            $this->createAttachments($options['attachments']);
        }

        if (isset($options['stringAttachment'])) {
            $this->createStringAttachments($options['stringAttachment']);
        }

        if (isset($options['replayto'])) {
            $this->createReplays($options['replayto']);
        }

        if (isset($options['cc'])) {
            $this->createCCs($options['cc']);
        }

        if (isset($options['bcc'])) {
            $this->createBCCs($options['bcc']);
        }

        if ($this->mailer->send()) {
            return true;
        } else {
            return false;
        }
    }
912893
public function from($from, $from_name = '')
    {
        $this->from      = $from;
        $this->from_name = $from_name;
        return $this;
    }
713149
private function sendEmailMessage($content, $from, $recipient)
    {
        $lines = explode(PHP_EOL, trim($content));
        $subject = $lines[0];
        $body = implode(PHP_EOL, array_slice($lines, 1));

        try {
            $mail = new \Swift_Message();
            $mail
                ->setSubject($subject)
                ->setBody($body)
                ->setFrom($from)
                ->addTo($recipient);

            $this->mailer->send($mail);
        } catch (\Exception $e) {
            $this->logger->error(__METHOD__.' failed to send mail: '.$e->getMessage());

            return false;
        }

        return true;
    }
1035396
public function send($subject, $content, $to, $fromName = '', $fromEmail = '')
    {
        $mail      = new CakeEmail();
        $fromName  = ($fromName !== '') ? $fromName : $this->_fromName;
        $fromEmail = ($fromEmail !== '') ? $fromEmail : $this->_fromEmail;
        $transport = new MailTransport();

        return $mail
            ->setTransport($transport)
            ->setTemplate($this->_tpl)
            ->setEmailFormat($this->_format)
            ->setFrom($fromEmail, $fromName)
            ->setTo($to)
            ->setSubject($subject)
            ->setViewVars(['page_title' => $subject])
            ->send($content);
    }
951260
public function setFrom($from)
    {
        $attr = $this->createAttribute('from');
        $this->doc->appendChild($attr);
        $attr->appendChild($this->createTextNode($from));
    }
953925
public function setFrom($fromEmail, $fromName = null)
    {
        $translator = $this->mailManager->getTranslator();

        $this->fromEmail = $translator->trans($fromEmail);
        if (null !== $fromName) {
            $this->fromName = $translator->trans($fromName);
        }

        return $this;
    }
147561
static public function extend(array $to, array $from)
    {
        foreach ($from as $key => $value) {
            if (is_array($value)) {
                $to[$key] = self::extend((array) (isset($to[$key]) ? $to[$key] : []),$value);
            }else{
                $to[$key] = $value;
            }
        }
        return $to;
    }