<pre>
Use this operation to get sent mail details..
</pre>
769875
public static sent_mails[] get(nitro_service client) throws Exception
	{
		sent_mails resource = new sent_mails();
		resource.validate("get");
		return (sent_mails[]) resource.get_resources(client);
	}
269973
def get(self, service_name, **kwargs):
        """"""
        return self._send(requests.get, service_name, **kwargs)
1181476
public SpamAnalysisResult spam(String email) throws IOException, MailosaurException {
    	return client.request("GET", "api/analysis/spam/" + email).parseAs(SpamAnalysisResult.class);
    }
416233
public ArrayList<Long> domain_task_mailinglist_GET(String domain, String account) throws IOException {
		String qPath = "/email/domain/{domain}/task/mailinglist";
		StringBuilder sb = path(qPath, domain);
		query(sb, "account", account);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t3);
	}
507057
@Override
    public String send() {

        String messageID = null;
        try {
            messageID = super.send();
        } catch (EmailException e) {
            // check if original Exception is of type SendFailedException which
            // should have been thrown by javax.mail.Transport.send()
            if (e.getCause() instanceof AuthenticationFailedException) {
                CmsMailHost host = OpenCms.getSystemInfo().getMailSettings().getDefaultMailHost();
                // wrong user credentials in opencms-system.xml: mail api does not provide a message for authentication exception

                CmsRuntimeException rte = new CmsRuntimeException(
                    Messages.get().container(
                        Messages.ERR_SEND_EMAIL_AUTHENTICATE_2,
                        host.getUsername(),
                        host.getHostname()));
                rte.initCause(e);
                throw rte;

            } else {
                CmsRuntimeException rte = new CmsRuntimeException(
                    Messages.get().container(Messages.ERR_SEND_EMAIL_CONFIG_0));
                rte.initCause(e);
                throw rte;
            }
        }
        return messageID;
    }
713259
function sendClassicEmail(details, callback) {
        deleteNullProperties(details);
        createsend.post('transactional/classicEmail/send', details.clientID, details, function(error, results) {
            txResponseCallback(error, results, callback);
        }, true);
    }
1159878
def getOperation(self, ps, address):
        ''' 
        '''
        action = address.getAction()
        opName = self.getOperationName(ps, action)
        return getattr(self, opName)
477801
public MailRequest newTextMailRequest(String requestId, String subject, String body) {
        return createMailRequest(requestId, false, subject, body);
    }
1316975
private void sendEmail(Message m, SendRawEmailRequest req)
            throws SendFailedException, MessagingException {

        Address[] sent = null;
        Address[] unsent = null;
        Address[] invalid = null;

        try {
            appendUserAgent(req, USER_AGENT);
            SendRawEmailResult resp = this.emailService.sendRawEmail(req);
            lastMessageId = resp.getMessageId();
            sent = m.getAllRecipients();
            unsent = new Address[0];
            invalid = new Address[0];
            super.notifyTransportListeners(TransportEvent.MESSAGE_DELIVERED,
                    sent, unsent, invalid, m);
        } catch (Exception e) {
            sent = new Address[0];
            unsent = m.getAllRecipients();
            invalid = new Address[0];
            super.notifyTransportListeners(
                    TransportEvent.MESSAGE_NOT_DELIVERED, sent, unsent,
                    invalid, m);
            throw new SendFailedException("Unable to send email", e, sent,
                    unsent, invalid);
        }
    }
1287693
public boolean email(final EmailProperties emailProperties, final String to, final String body) {
        try {
            if (!isMailSenderDefined() || emailProperties.isUndefined() || StringUtils.isBlank(to)) {
                LOGGER.warn("Could not send email to [{}] because either no from/to/subject/text is defined or email settings are not configured.", to);
                return false;
            }

            val message = this.mailSender.createMimeMessage();
            val helper = new MimeMessageHelper(message);
            helper.setTo(to);
            helper.setText(body, emailProperties.isHtml());
            helper.setSubject(emailProperties.getSubject());
            helper.setFrom(emailProperties.getFrom());
            if (StringUtils.isNotBlank(emailProperties.getReplyTo())) {
                helper.setReplyTo(emailProperties.getReplyTo());
            }
            helper.setValidateAddresses(emailProperties.isValidateAddresses());
            helper.setPriority(1);

            if (StringUtils.isNotBlank(emailProperties.getCc())) {
                helper.setCc(emailProperties.getCc());
            }

            if (StringUtils.isNotBlank(emailProperties.getBcc())) {
                helper.setBcc(emailProperties.getBcc());
            }
            this.mailSender.send(message);
            return true;
        } catch (final Exception ex) {
            LOGGER.error(ex.getMessage(), ex);
        }
        return false;
    }
976786
public void request(
            final Message message,
            final OperationResult<Message, Exception> onResponse) {

        if (message == null) {
            throw new IllegalArgumentException("message cannot be null");
        }
        if (message.getMessageId() != null) {
            throw new IllegalArgumentException("message.getMessageId() should be null");
        }
        if (message.getReplyTo() != null) {
            throw new IllegalArgumentException("message.getReplyTo() should be null");
        }
        message.setMessageId("request" + UnsignedLong.valueOf(this.requestId.incrementAndGet()).toString());
        message.setReplyTo(this.replyTo);

        this.inflightRequests.put(message.getMessageId(), onResponse);

        sendLink.delivery(UUID.randomUUID().toString().replace("-", StringUtil.EMPTY).getBytes(UTF_8));
        final int payloadSize = AmqpUtil.getDataSerializedSize(message) + 512; // need buffer for headers

        final byte[] bytes = new byte[payloadSize];
        final int encodedSize = message.encode(bytes, 0, payloadSize);

        receiveLink.flow(1);
        sendLink.send(bytes, 0, encodedSize);
        sendLink.advance();
    }
564594
public static void mail(String mailAddress) {
		final Desktop dsktop = getDsktop();
		try {
			dsktop.mail(URLUtil.toURI(mailAddress));
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}
1236369
public <T extends IEntity> T sendEmail(T entity) throws FMSException {
        return sendEmail(entity, null);
    }
979715
public OvhResponderAccount delegatedAccount_email_responder_GET(String email) throws IOException {
		String qPath = "/email/domain/delegatedAccount/{email}/responder";
		StringBuilder sb = path(qPath, email);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhResponderAccount.class);
	}
1297492
private void sendOpsResponse(VoltTable[] results, JSONObject obj, byte payloadType) throws Exception
    {
        long requestId = obj.getLong("requestId");
        long returnAddress = obj.getLong("returnAddress");
        // Send a response with no data since the stats is not supported or not yet available
        if (results == null) {
            ByteBuffer responseBuffer = ByteBuffer.allocate(8);
            responseBuffer.putLong(requestId);
            byte responseBytes[] = CompressionService.compressBytes(responseBuffer.array());
            BinaryPayloadMessage bpm = new BinaryPayloadMessage( new byte[] {payloadType}, responseBytes);
            m_mailbox.send(returnAddress, bpm);
            return;
        }

        ByteBuffer[] bufs = new ByteBuffer[results.length];
        int statbytes = 0;
        for (int i = 0; i < results.length; i++) {
            bufs[i] = results[i].getBuffer();
            bufs[i].position(0);
            statbytes += bufs[i].remaining();
        }

        ByteBuffer responseBuffer = ByteBuffer.allocate(
                8 + // requestId
                4 * results.length + // length prefix for each stats table
                + statbytes);
        responseBuffer.putLong(requestId);
        for (ByteBuffer buf : bufs) {
            responseBuffer.putInt(buf.remaining());
            responseBuffer.put(buf);
        }
        byte responseBytes[] = CompressionService.compressBytes(responseBuffer.array());

        BinaryPayloadMessage bpm = new BinaryPayloadMessage( new byte[] {payloadType}, responseBytes);
        m_mailbox.send(returnAddress, bpm);
    }
1138587
@Nonnull
  public ICommonsOrderedMap <IMutableEmailData, MailTransportError> send (@Nullable final Collection <IMutableEmailData> aAllMessages)
  {
    final ICommonsOrderedMap <IMutableEmailData, MailTransportError> aFailedMessages = new CommonsLinkedHashMap <> ();
    if (aAllMessages != null)
    {
      final ICommonsList <IMutableEmailData> aRemainingMessages = new CommonsArrayList <> (aAllMessages);
      MailSendException aExceptionToBeRemembered = null;

      try (final Transport aTransport = m_aSession.getTransport (m_bSMTPS ? SMTPS_PROTOCOL : SMTP_PROTOCOL))
      {
        // Add global listeners (if present)
        for (final ConnectionListener aConnectionListener : EmailGlobalSettings.getAllConnectionListeners ())
          aTransport.addConnectionListener (aConnectionListener);

        // Check if a detailed listener is present
        final ICommonsList <IEmailDataTransportListener> aEmailDataTransportListeners = EmailGlobalSettings.getAllEmailDataTransportListeners ();

        // Connect
        aTransport.connect (m_aSMTPSettings.getHostName (),
                            m_aSMTPSettings.getPort (),
                            m_aSMTPSettings.getUserName (),
                            m_aSMTPSettings.getPassword ());

        // For all messages
        for (final IMutableEmailData aEmailData : aAllMessages)
        {
          final MimeMessage aMimeMessage = new MimeMessage (m_aSession);
          try
          {
            // convert from IEmailData to MimeMessage
            MailConverter.fillMimeMessage (aMimeMessage, aEmailData, m_aSMTPSettings.getCharsetObj ());

            // Ensure a sent date is present
            if (aMimeMessage.getSentDate () == null)
              aMimeMessage.setSentDate (new Date ());

            // Get an explicitly specified message ID
            final String sMessageID = aMimeMessage.getMessageID ();

            // This creates a new message ID (besides other things)
            aMimeMessage.saveChanges ();

            if (sMessageID != null)
            {
              // Preserve explicitly specified message id...
              aMimeMessage.setHeader (HEADER_MESSAGE_ID, sMessageID);
            }
            aMimeMessage.setHeader ("X-Mailer", X_MAILER);

            if (LOGGER.isInfoEnabled ())
              LOGGER.info ("Delivering mail from " +
                              Arrays.toString (aMimeMessage.getFrom ()) +
                              " to " +
                              Arrays.toString (aMimeMessage.getAllRecipients ()) +
                              " with subject '" +
                              aMimeMessage.getSubject () +
                              "' and message ID '" +
                              aMimeMessage.getMessageID () +
                              "'");

            // Main transmit - always throws an exception
            aTransport.sendMessage (aMimeMessage, aMimeMessage.getAllRecipients ());
            throw new IllegalStateException ("Never expected to come beyong sendMessage!");
          }
          catch (final SendFailedException ex)
          {
            if (EmailGlobalSettings.isDebugSMTP ())
              LOGGER.error ("Error send mail - SendFailedException", ex);

            /*
             * Extract all addresses: the valid addresses to which the message
             * was sent, the valid address to which the message was not sent and
             * the invalid addresses
             */
            final ICommonsSet <String> aValidSent = CollectionHelper.newSetMapped (ex.getValidSentAddresses (),
                                                                                   Address::toString);
            final ICommonsSet <String> aValidUnsent = CollectionHelper.newSetMapped (ex.getValidUnsentAddresses (),
                                                                                     Address::toString);
            final ICommonsSet <String> aInvalid = CollectionHelper.newSetMapped (ex.getInvalidAddresses (),
                                                                                 Address::toString);

            final ICommonsList <MailSendDetails> aDetails = new CommonsArrayList <> ();
            Exception ex2;
            MessagingException bex = ex;
            while ((ex2 = bex.getNextException ()) != null && ex2 instanceof MessagingException)
            {
              if (ex2 instanceof SMTPAddressFailedException)
              {
                final SMTPAddressFailedException ssfe = (SMTPAddressFailedException) ex2;
                aDetails.add (new MailSendDetails (false,
                                                   ssfe.getAddress ().toString (),
                                                   ssfe.getCommand (),
                                                   ssfe.getMessage ().trim (),
                                                   ESMTPErrorCode.getFromIDOrDefault (ssfe.getReturnCode (),
                                                                                      ESMTPErrorCode.FALLBACK)));
              }
              else
                if (ex2 instanceof SMTPAddressSucceededException)
                {
                  final SMTPAddressSucceededException ssfe = (SMTPAddressSucceededException) ex2;
                  aDetails.add (new MailSendDetails (true,
                                                     ssfe.getAddress ().toString (),
                                                     ssfe.getCommand (),
                                                     ssfe.getMessage ().trim (),
                                                     ESMTPErrorCode.getFromIDOrDefault (ssfe.getReturnCode (),
                                                                                        ESMTPErrorCode.FALLBACK)));
                }

              bex = (MessagingException) ex2;
            }

            // Map addresses to details
            final ICommonsOrderedSet <MailSendDetails> aValidSentExt = new CommonsLinkedHashSet <> ();
            final ICommonsOrderedSet <MailSendDetails> aValidUnsentExt = new CommonsLinkedHashSet <> ();
            final ICommonsOrderedSet <MailSendDetails> aInvalidExt = new CommonsLinkedHashSet <> ();
            for (final MailSendDetails aFailure : aDetails)
            {
              final String sAddress = aFailure.getAddress ();
              if (aValidSent.contains (sAddress))
                aValidSentExt.add (aFailure);
              else
                if (aValidUnsent.contains (sAddress))
                  aValidUnsentExt.add (aFailure);
                else
                  aInvalidExt.add (aFailure);
            }

            final EmailDataTransportEvent aEvent = new EmailDataTransportEvent (m_aSMTPSettings,
                                                                                aEmailData,
                                                                                aMimeMessage,
                                                                                aValidSentExt,
                                                                                aValidUnsentExt,
                                                                                aInvalidExt);
            if (aValidUnsent.isEmpty () && aInvalid.isEmpty () && aValidSent.isNotEmpty ())
            {
              // Message delivered
              for (final IEmailDataTransportListener aEmailDataTransportListener : aEmailDataTransportListeners)
                aEmailDataTransportListener.messageDelivered (aEvent);

              // Remove message from list of remaining
              s_aStatsCountSuccess.increment ();
            }
            else
            {
              // Message not delivered
              for (final IEmailDataTransportListener aEmailDataTransportListener : aEmailDataTransportListeners)
                aEmailDataTransportListener.messageNotDelivered (aEvent);

              // Sending exactly this message failed
              aFailedMessages.put (aEmailData, new MailTransportError (ex, aDetails));
              s_aStatsCountFailed.increment ();
            }
            // Remove message from list of remaining as we put it in the
            // failed message list manually in case of error
            aRemainingMessages.remove (aEmailData);
          }
          catch (final MessagingException ex)
          {
            if (EmailGlobalSettings.isDebugSMTP ())
              LOGGER.error ("Error send mail - MessagingException", ex);

            final ICommonsOrderedSet <MailSendDetails> aInvalid = new CommonsLinkedHashSet <> ();
            final Consumer <IEmailAddress> aConsumer = a -> aInvalid.add (new MailSendDetails (false,
                                                                                               a.getAddress (),
                                                                                               "<generic error>",
                                                                                               ex.getMessage (),
                                                                                               ESMTPErrorCode.FALLBACK));
            aEmailData.forEachTo (aConsumer);
            aEmailData.forEachCc (aConsumer);
            aEmailData.forEachBcc (aConsumer);

            final EmailDataTransportEvent aEvent = new EmailDataTransportEvent (m_aSMTPSettings,
                                                                                aEmailData,
                                                                                aMimeMessage,
                                                                                new CommonsArrayList <> (),
                                                                                new CommonsArrayList <> (),
                                                                                aInvalid);
            // Message not delivered
            for (final IEmailDataTransportListener aEmailDataTransportListener : aEmailDataTransportListeners)
              aEmailDataTransportListener.messageNotDelivered (aEvent);

            // Sending exactly this message failed
            aFailedMessages.put (aEmailData, new MailTransportError (ex));
            // Remove message from list of remaining as we put it in the
            // failed message list manually
            aRemainingMessages.remove (aEmailData);
            s_aStatsCountFailed.increment ();
          }
        } // for all messages
      }
      catch (final AuthenticationFailedException ex)
      {
        // problem with the credentials
        aExceptionToBeRemembered = new MailSendException ("Mail server authentication failed", ex);
      }
      catch (final MessagingException ex)
      {
        if (WebExceptionHelper.isServerNotReachableConnection (ex.getCause ()))
          aExceptionToBeRemembered = new MailSendException ("Failed to connect to mail server: " +
                                                            ex.getCause ().getMessage ());
        else
          aExceptionToBeRemembered = new MailSendException ("Mail server connection failed", ex);
      }
      catch (final Exception ex)
      {
        // E.g. IllegalState from SMTPTransport ("Not connected")
        aExceptionToBeRemembered = new MailSendException ("Internal error sending mail", ex);
      }
      finally
      {
        // Was any message not sent
        if (aRemainingMessages.isNotEmpty ())
        {
          if (aExceptionToBeRemembered == null)
            aExceptionToBeRemembered = new MailSendException ("Internal error - messages are remaining but no Exception occurred!");
          for (final IMutableEmailData aRemainingMessage : aRemainingMessages)
            aFailedMessages.put (aRemainingMessage, new MailTransportError (aExceptionToBeRemembered));
        }
      }
    }
    return aFailedMessages;
  }
999747
@Override
    protected FileInfo getFileInfoFromInputDataImpl(Message inputData)
    {
        FileInfo fileInfo=null;
        try
        {
            //get file info
            fileInfo=this.getFileInfo(inputData);
        }
        catch(MessagingException exception)
        {
            throw new FaxException("Unable to extract fax job file data from mail message.",exception);
        }
        catch(IOException exception)
        {
            throw new FaxException("Unable to extract fax job file data from mail message.",exception);
        }
        
        return fileInfo;
    }