Provides the class of Sender
187711
def sender_class(sender)
      if sender.kind_of? Symbol
        reflections[sender.to_s].klass
      elsif sender.kind_of? ActiveRecord::Base
        sender.class
      else
        raise 'SimpleNotifications::SenderTypeError'
      end
    end
1161012
def send(self, sender: PytgbotApiBot):
        
        return sender.send_location(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            latitude=self.latitude, longitude=self.longitude, chat_id=self.receiver, reply_to_message_id=self.reply_id, live_period=self.live_period, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
844135
function CharacterClass(class_id, class_name, is_always_invoke, is_grouping, max_length) {
    this.class_id = class_id;
    this.class_name = class_name;
    this.is_always_invoke = is_always_invoke;
    this.is_grouping = is_grouping;
    this.max_length = max_length;
}
1324707
def getProtocolClasses(superclass=message.Message):
    
    # We keep a manual list of the superclasses that we define here
    # so we can filter them out when we're getting the protocol
    # classes.
    superclasses = set([message.Message])
    thisModule = sys.modules[__name__]
    subclasses = []
    for name, class_ in inspect.getmembers(thisModule):
        if ((inspect.isclass(class_) and
                issubclass(class_, superclass) and
                class_ not in superclasses)):
            subclasses.append(class_)
    return subclasses
63202
def send(self, sender: PytgbotApiBot):
        
        return sender.send_sticker(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            sticker=self.sticker, chat_id=self.receiver, reply_to_message_id=self.reply_id, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
1032248
def _get_receivers(self, sender):
        '''  '''
        key = _make_id(sender)
        receivers = []
        for (receiver_key, sender_key), receiver in self.receivers.items():
            if sender_key == key:
                receivers.append(receiver)
        return receivers
1047468
def _get_sender(self, sender):
        
        if isinstance(sender, tuple):
            return "%s <%s>" % sender, sender[0], sender[1]
        else:
            return sender, sender, sender
1350327
def send(self, sender: PytgbotApiBot):
        
        return sender.send_audio(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            audio=self.audio, chat_id=self.receiver, reply_to_message_id=self.reply_id, caption=self.caption, parse_mode=self.parse_mode, duration=self.duration, performer=self.performer, title=self.title, thumb=self.thumb, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
1143701
public Sender getResponseSender() {
        if (blockingHttpExchange != null) {
            return blockingHttpExchange.getSender();
        }
        if (sender != null) {
            return sender;
        }
        return sender = new AsyncSenderImpl(this);
    }
736613
def _default
        given_defaults = (respond_to?(:default, true) && default) || {}
        if MandrillBatchMailer.intercept_recipients
          given_defaults[:message].try(:delete, :to)
        end
        given_defaults
      end
884094
def send(self, to, subject, body, reply_to=None, **kwargs):
        
        if self.provider == "SES":
            self.mail.send(to=to,
                           subject=subject,
                           body=body,
                           reply_to=reply_to,
                           **kwargs)
        elif self.provider == "FLASK-MAIL":
            msg = flask_mail.Message(recipients=to, subject=subject, body=body, reply_to=reply_to,
                                     sender=self.app.config.get("MAIL_DEFAULT_SENDER"))
            self.mail.send(msg)
405375
def send(self, sender: PytgbotApiBot):
        
        return sender.send_animation(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            animation=self.animation, chat_id=self.receiver, reply_to_message_id=self.reply_id, duration=self.duration, width=self.width, height=self.height, thumb=self.thumb, caption=self.caption, parse_mode=self.parse_mode, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
834159
def send(self, sender: PytgbotApiBot):
        
        return sender.send_message(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            text=self.text, chat_id=self.receiver, reply_to_message_id=self.reply_id, parse_mode=self.parse_mode, disable_web_page_preview=self.disable_web_page_preview, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
1208227
def envelope(self):
		""""""
		if not self.sender and not self.author:
			raise ValueError("Unable to determine message sender; no author or sender defined.")

		return self.sender or self.author[0]
90847
def email_message(
        self,
        user,
        subject_template,
        body_template,
        sender=None,
        message_class=EmailMessage,
        **kwargs
    ):
        
        if sender:
            try:
                display_name = sender.get_full_name()
            except (AttributeError, TypeError):
                display_name = sender.get_username()
            from_email = "%s <%s>" % (
                display_name, email.utils.parseaddr(settings.DEFAULT_FROM_EMAIL)[1]
            )
            reply_to = "%s <%s>" % (display_name, sender.email)
        else:
            from_email = settings.DEFAULT_FROM_EMAIL
            reply_to = from_email

        headers = {"Reply-To": reply_to}
        kwargs.update({"sender": sender, "user": user})

        subject_template = loader.get_template(subject_template)
        body_template = loader.get_template(body_template)
        subject = subject_template.render(
            kwargs
        ).strip()  # Remove stray newline characters
        body = body_template.render(kwargs)
        return message_class(subject, body, from_email, [user.email], headers=headers)
968363
def main():
    
    log = logging.getLogger(mod_logger + '.main')
    parser = argparse.ArgumentParser(description='This module allows sending email messages.')
    parser.add_argument('-f', '--file', help='Full path to a plain text file', required=False)
    parser.add_argument('-s', '--sender', help='Email address of the sender', required=False)
    parser.add_argument('-r', '--recipient', help='Email address of the recipient', required=False)
    args = parser.parse_args()

    am = AssetMailer()
    err = None
    if args.file:
        try:
            am.send_text_file(text_file=args.file, sender=args.sender, recipient=args.recipient)
        except AssetMailerError:
            _, ex, trace = sys.exc_info()
            err = '{n}: There was a problem sending email with file {f} from sender {s} to recipient {r}:\n{e}'.format(
                n=ex.__class__.__name__, f=args.file, s=args.sender, r=args.recipient, e=str(ex))
            log.error(err)
    else:
        try:
            am.send_cons3rt_agent_logs()
        except AssetMailerError:
            _, ex, trace = sys.exc_info()
            err = '{n}: There was a problem sending cons3rt agent log files:\n{e}'.format(
                n=ex.__class__.__name__, e=str(ex))
            log.error(err)
    if err is None:
        log.info('Successfully send email')
930525
public void send(Object message, ActorRef sender) {
        endpoint.getMailbox().schedule(new Envelope(message, endpoint.getScope(), endpoint.getMailbox(), sender));
    }