Send the email.
@return bool|int
486610
public function send()
    {
        $smtpServer = $this->config->get('phpci.email_settings.smtp_address');

        if (empty($smtpServer)) {
            return $this->sendViaMail();
        } else {
            return $this->sendViaSwiftMailer();
        }
    }
145324
public function sendEmailAction()
    {
        $email = $this->container->get('request')->request->get('email');

        /**
         * @var $user UserInterface
         */
        $user = $this->container->get('fos_user.user_manager')->findUserByEmail($email);

        if (null === $user) {
            return $this->container->get('templating')->renderResponse(
                'FOSUserBundle:Resetting:request.html.'.$this->getEngine(),
                array('invalid_email' => $email)
            );
        }

        $code = $this->resetEmail($user);
        switch ($code) {
            case self::RESET_EMAIL_ALREADY_SENT:
                return $this->container->get('templating')->renderResponse(
                    'FOSUserBundle:Resetting:passwordAlreadyRequested.html.'.$this->getEngine()
                );
                break;
            case self::RESET_EMAIL_OK:
                return new RedirectResponse(
                    $this->container->get('router')->generate('fos_user_resetting_check_email')
                );
                break;
        }
    }
360132
public function send()
    {
        return $this->client->executeRequest(
            new OutboundSMSRequest(
                $this->message,
                $this->recipientNumber,
                $this->senderNumber,
                $this->senderName
            )
        );
    }
1250957
public function send()	{

		$this->buildHeaders();
		$this->buildMsg();

		if (!self::$debug) {
			return $this->sendMail();
		}

		$headers = [];
		foreach($this->headers as $k => $v) {
			$headers[] = "$k: $v";
		}
		echo '<div style="border: solid 2px #888; background:#efe; font-family: monospace; font-size: 1em; padding: 1em; margin: 1em;">';
		echo is_array($this->receiver) ? implode(', ', $this->receiver) : $this->receiver, '<hr>';
		echo implode('<br>', $headers), '<hr>', $this->subject, '<hr>', nl2br($this->msg);
		echo '</div>';

		return true;

	}
164918
public function send()
    {
        if (!$this->_user->has('email') || !$this->_user->has('name')) {
            throw new BadMethodCallException(__d('user', 'Missing "name" or "email" property when trying to send the email.'));
        }

        if ($this->config('updateToken') === true) {
            $this->loadModel('User.Users');
            $this->_user->updateToken();
        }

        $subject = $this->_parseVariables((string)$this->subject());
        $body = $this->_parseVariables((string)$this->body());

        if (empty($subject) || empty($body)) {
            return false;
        }

        $sender = new Email($this->config('emailConfig'));
        $sent = false;
        try {
            $sent = $sender
                ->to($this->_user->get('email'), $this->_user->get('name'))
                ->subject($subject)
                ->send($body);
        } catch (\Exception $e) {
            return false;
        }

        return $sent;
    }
847286
public function sendOutput()
    {
        if ($this->binary) {
            $rcmail = rcmail::get_instance();
            $rcmail->output->future_expire_header(10 * 60);

            header('Content-Type: ' . $this->mimetype);
            header('Content-Size: ' . strlen($this->binary));
            echo $this->binary;

            return true;
        }

        return false;
    }
154326
public function send()
    {
        $appEncoding = Configuration::read('application.encoding');
        $encoding = new Encoding();
        $subject = $this->addEncodeTag($this->subject);
        $headerContent = $this->getHeaderContent();
        $mailContent = $this->getEmailContent();
        if ($appEncoding != $this->charset) {
            $subject = $encoding->convert($subject, $appEncoding, $this->charset);
            $headerContent = $encoding->convert($headerContent, $appEncoding, $this->charset);
            $mailContent = $encoding->convert($mailContent, $appEncoding, $this->charset);
        }
        return mail($this->getRecipientTo(), $this->subject, $mailContent, $headerContent);
    }
853310
public function send()
    {
        $stack = $this->getStack();

        if ($stack->count() == 0) {
            return false;
        }

        foreach ($stack as $mail) {

            if (!$mail->send()) {
                $this->errors[] = $mail->ErrorInfo;
            }
        
        }

        if (count($this->errors) > 0) {
            return false;
        }

        return true;
    }
683783
public function send(Email $email)
    {
        if (!$this->connected()) {
            $this->_connect();
            $this->_auth();
        } else {
            $this->_smtpSend('RSET');
        }

        $this->_sendRcpt($email);
        $this->_sendData($email);

        if (!$this->_config['keepAlive']) {
            $this->_disconnect();
        }

        return $this->_content;
    }
1346272
public function send()
    {

        $this->ok = false;
// Try using curl if available
        if (function_exists('curl_init')) {
            $resp = '';
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $this->url);
            if (!empty($this->requestHeaders)) {
                curl_setopt($ch, CURLOPT_HTTPHEADER, $this->requestHeaders);
            } else {
                curl_setopt($ch, CURLOPT_HEADER, 0);
            }
            if ($this->method === 'POST') {
                curl_setopt($ch, CURLOPT_POST, true);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $this->request);
            } else if ($this->method !== 'GET') {
                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->method);
                if (!is_null($this->request)) {
                    curl_setopt($ch, CURLOPT_POSTFIELDS, $this->request);
                }
            }
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLINFO_HEADER_OUT, true);
            curl_setopt($ch, CURLOPT_HEADER, true);
            $chResp = curl_exec($ch);
            $this->ok = $chResp !== false;
            if ($this->ok) {
                $chResp = str_replace("\r\n", "\n", $chResp);
                $chRespSplit = explode("\n\n", $chResp, 2);
                if ((count($chRespSplit) > 1) && (substr($chRespSplit[1], 0, 5) === 'HTTP/')) {
                    $chRespSplit = explode("\n\n", $chRespSplit[1], 2);
                }
                $this->responseHeaders = $chRespSplit[0];
                $resp = $chRespSplit[1];
                $this->status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                $this->ok = $this->status < 400;
                if (!$this->ok) {
                    $this->error = curl_error($ch);
                }
            }
            $this->requestHeaders = str_replace("\r\n", "\n", curl_getinfo($ch, CURLINFO_HEADER_OUT));
            curl_close($ch);
            $this->response = $resp;
        } else {
// Try using fopen if curl was not available
            $opts = array('method' => $this->method,
                          'content' => $this->request
                         );
            if (!empty($this->requestHeaders)) {
                $opts['header'] = $this->requestHeaders;
            }
            try {
                $ctx = stream_context_create(array('http' => $opts));
                $fp = @fopen($this->url, 'rb', false, $ctx);
                if ($fp) {
                    $resp = @stream_get_contents($fp);
                    $this->ok = $resp !== false;
                }
            } catch (\Exception $e) {
                $this->ok = false;
            }
        }

        return $this->ok;

    }
1054528
public function sendEmail()
    {
        $user = User::findOne([
            'email' => $this->email,
            'status' => User::STATUS_INACTIVE
        ]);

        if ($user === null) {
            return false;
        }

        return Yii::$app
            ->mailer
            ->compose(
                ['html' => 'emailVerify-html', 'text' => 'emailVerify-text'],
                ['user' => $user]
            )
            ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])
            ->setTo($this->email)
            ->setSubject('Account registration at ' . Yii::$app->name)
            ->send();
    }
158255
public function send() {
		$curl_handle = curl_init();

		$postfields=array();
		$postfields['token'] =  $this->token;
		$postfields['user'] = $this->userkey;
		$postfields['message'] = $this->message;
		$postfields['url'] = $this->url;
		$postfields['priority'] = $this->priority;
		$postfields['url_title'] = $this->url_title;
		$postfields['retry'] = $this->retry;
		$postfields['expire'] = $this->expire;

		curl_setopt_array($curl_handle,
			array(
				CURLOPT_URL => $this->pushover_messages_url,
				CURLOPT_POSTFIELDS => $postfields,
                CURLOPT_RETURNTRANSFER => true,
			));
		$response = curl_exec($curl_handle);
		curl_close($curl_handle);

		if (isset($response['status']) && $response['status'] == 1) {
			return true;
		}
		return false;
	}
543869
protected function _send()
	{
		$message = $this->build_message();

		logger(\Fuel::L_INFO, 'To: '.static::format_addresses($this->to), 'Email NoOp driver');
		logger(\Fuel::L_INFO, 'Subject: '.$this->subject, 'Email NoOp driver');
		logger(\Fuel::L_INFO, 'Header: '.$message['header'], 'Email NoOp driver');
		logger(\Fuel::L_INFO, 'Body: '.$message['body'], 'Email NoOp driver');

		return true;
	}
1086926
def send_email(self):
        
        # send only if user notification setting is set to true
        if self.check_user_settings():
            send_mail(_(self.type), self.email_message, settings.DEFAULT_FROM_EMAIL, [self.to_user.email])
            return True
        else:
            # return false otherwise
            return False
1063342
public function send()
    {
        if (empty($this->mailer->Subject) || empty($this->mailer->Body)) {
            throw new Exception("Mail subject() and body() can not be empty in order to send mail.");
        }
        if (!$this->getMailer()->send()) {
            Yii::error($this->getError(), __METHOD__);
            return false;
        }
        return true;
    }
1078941
public function send()
    {
        $useHtml = (bool)$this->getConfig("use_html");

        $mergedHeaders = $this->getMergedHeaders();

        if ($useHtml) {
            $this->setHtmlEmails();
        }

        if ($this->hasConfig("attachedFile")) {
            $status = wp_mail(
                $this->getConfig("to"),
                $this->getConfig("title"),
                $this->getConfig("contents"),
                $this->toHeaderString($mergedHeaders) . $this->buildBCCString(),
                $this->getConfig("attachedFile")
            );
        } else {
            $status = wp_mail(
                $this->getConfig("to"),
                $this->getConfig("title"),
                $this->getConfig("contents"),
                $this->toHeaderString($mergedHeaders) . $this->buildBCCString()
            );
        }

        $logMessage = $status ?
            sprintf("<success>Sent an email</success> to %s with title \"%s\" and a body length of %d characters.", implode(", ", (array)$this->getConfig("to")), $this->getConfig("title"), strlen($this->getConfig("contents"))) :
            sprintf("<warning>Failed to send an email</warning> to %s with title \"%s\" and a body length of %d characters.",  implode(", ", (array)$this->getConfig("to")), $this->getConfig("title"), strlen($this->getConfig("contents")));

        Strata::app()->log($logMessage, "<info>Strata:Mailer</info>");

        if ($useHtml) {
            $this->setHtmlEmails(false);
        }

        return $status;
    }
979593
public function send()
    {
        $blError = true;

        // error
        if (($sOxid = $this->getEditObjectId())) {
            $oPricealarm = oxNew(\OxidEsales\Eshop\Application\Model\PriceAlarm::class);
            $oPricealarm->load($sOxid);

            $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");
            $sMailBody = isset($aParams['oxpricealarm__oxlongdesc']) ? stripslashes($aParams['oxpricealarm__oxlongdesc']) : '';
            if ($sMailBody) {
                $sMailBody = \OxidEsales\Eshop\Core\Registry::getUtilsView()->parseThroughSmarty($sMailBody, $oPricealarm->getId());
            }

            $sRecipient = $oPricealarm->oxpricealarm__oxemail->value;

            $oEmail = oxNew(\OxidEsales\Eshop\Core\Email::class);
            $blSuccess = (int) $oEmail->sendPricealarmToCustomer($sRecipient, $oPricealarm, $sMailBody);

            // setting result message
            if ($blSuccess) {
                $oPricealarm->oxpricealarm__oxsended->setValue(date("Y-m-d H:i:s"));
                $oPricealarm->save();
                $blError = false;
            }
        }

        if (!$blError) {
            $this->_aViewData["mail_succ"] = 1;
        } else {
            $this->_aViewData["mail_err"] = 1;
        }
    }