Adding one cc-address to the EmailMessage.

@param internetAddress
The InternetAddress-object.
@throws MessagingException
is thrown if the underlying implementation does not support modification of
existing values
353614
public void addCc(final Address internetAddress) throws MessagingException
	{
		super.addRecipient(javax.mail.Message.RecipientType.CC, internetAddress);
	}
66085
public void addEmailStats(final InternetAddress[] recipients, final boolean storageUsed) {
        this.storageUsed = storageUsed;
        for (InternetAddress recipient: recipients) {
            emailDests.add(recipient.getAddress());
        }
    }
554568
@Override
	@Transactional(enabled = false)
	public CommerceAddress createCommerceAddress(long commerceAddressId) {
		return commerceAddressPersistence.create(commerceAddressId);
	}
44860
protected String getSenderEmail(Message mailMessage) throws MessagingException
    {
        Address[] addresses=mailMessage.getFrom();
        String senderEmail=null;
        if((addresses!=null)&&(addresses.length>0))
        {
            //get sender mail address (only first from is used)
            Address address=addresses[0];
            
            //get as string
            senderEmail=address.toString();
        }

        return senderEmail;
    }
508569
public static <M, A extends InetSocketAddress> AddressedEnvelope<M, A> of(M message, A sender) {
        return new DefaultAddressedEnvelope<>(message, null, sender);
    }
1252981
public void addAttachment(final DataHandler handler, final String filename)
		throws MessagingException
	{
		final BodyPart part = new MimeBodyPart();
		part.setFileName(filename);
		part.setDataHandler(handler);
		addAttachment(part);
	}
1049123
@Nullable
  public static EmailAddress getAsEmailAddress (@Nullable final InternetAddress aInternetAddress)
  {
    return aInternetAddress == null ? null : new EmailAddress (aInternetAddress.getAddress (),
                                                               aInternetAddress.getPersonal ());
  }
564594
public static void mail(String mailAddress) {
		final Desktop dsktop = getDsktop();
		try {
			dsktop.mail(URLUtil.toURI(mailAddress));
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}
115879
public void setCcEmailAddresses(java.util.Collection<String> ccEmailAddresses) {
        if (ccEmailAddresses == null) {
            this.ccEmailAddresses = null;
            return;
        }

        this.ccEmailAddresses = new com.amazonaws.internal.SdkInternalList<String>(ccEmailAddresses);
    }
333997
void validateAndPrepare(Message message, Address[] addresses) throws MessagingException {
        if (message.getFrom() == null || message.getFrom().length == 0) {
            fail(message, addresses, "No or empty FROM address set!");
        }
        if (addresses.length == 0) {
            fail(message, addresses, "No RECIPIENTS set!");
        }
        Address[] messageAddresses = message.getAllRecipients();
        if (messageAddresses == null) {
            for(Address address : addresses) {
                message.addRecipient(Message.RecipientType.TO, address);
            }
        } else {
            out:
            for(Address address : addresses) {
                for(Address a : messageAddresses) {
                    if (a == null) {
                        continue;
                    }
                    if (a.equals(address)) {
                        continue out;
                    }
                }
                message.addRecipient(Message.RecipientType.TO, address);
            }
        }
    }
159177
public void sendTyping(SignalServiceAddress recipient,
                         Optional<UnidentifiedAccessPair> unidentifiedAccess,
                         SignalServiceTypingMessage message)
      throws IOException, UntrustedIdentityException
  {
    byte[] content = createTypingContent(message);

    sendMessage(recipient, getTargetUnidentifiedAccess(unidentifiedAccess), message.getTimestamp(), content, true);
  }
1326921
public Address createAddress(String sipAddress)
			throws ServletParseException {
		try {
			if (logger.isDebugEnabled()) {
				logger.debug("Creating Address from [" + sipAddress + "]");
			}

			AddressImpl retval = new AddressImpl();
			retval.setValue(sipAddress);
			return retval;
		} catch (IllegalArgumentException e) {
			throw new ServletParseException(e);
		}
	}
520998
public void setInetAddress(final String address) {
        try {
            this.inetAddress = InetAddress.getByName(address);
        } catch (final UnknownHostException e) {
            throw new RuntimeException("Invalid address " + address);
        }
    }
267732
public static boolean validateEmailAdress(final String emailAddress)
	{
		boolean isValid = true;
		try
		{
			final InternetAddress internetAddress = new InternetAddress(emailAddress);
			internetAddress.validate();
		}
		catch (final AddressException e)
		{
			isValid = false;
		}
		return isValid;
	}
414192
public void sendMail (String to, String subject, String content) throws MessagingException {
        Properties props = new Properties();
        props.put("mail.smtp.user", emailConfg.getUser());
        props.put("mail.smtp.host", emailConfg.getHost());
        props.put("mail.smtp.port", emailConfg.getPort());
        props.put("mail.smtp.starttls.enable","true");
        props.put("mail.smtp.debug", emailConfg.getDebug());
        props.put("mail.smtp.auth", emailConfg.getAuth());
        props.put("mail.smtp.ssl.trust", emailConfg.host);

        SMTPAuthenticator auth = new SMTPAuthenticator(emailConfg.getUser(), (String)secret.get(SecretConstants.EMAIL_PASSWORD));
        Session session = Session.getInstance(props, auth);

        MimeMessage message = new MimeMessage(session);

        message.setFrom(new InternetAddress(emailConfg.getUser()));
        message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));

        message.setSubject(subject);

        message.setContent(content, "text/html");

        // Send message
        Transport.send(message);
        if(logger.isInfoEnabled()) logger.info("An email has been sent to " + to + " with subject " + subject);
    }
1176187
public function addCC( $ccEmail, $ccName = null ) {
		if( !is_null( $ccName ) ) {
			$this->mCC[$ccName] = $ccEmail;
		} else {
			$this->mCC[] = $ccEmail;
		}
	}
522510
public void messagingEngineStarting(final JsMessagingEngine messagingEngine) {

        final String methodName = "messagingEngineStarting";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, messagingEngine);
        }

        try {

            addMessagingEngine(messagingEngine);

        } catch (final ResourceException exception) {

            FFDCFilter.processException(exception, CLASS_NAME + "."
                    + methodName, "1:608:1.40", this);
            SibTr.error(TRACE, "MESSAGING_ENGINE_STARTING_CWSIV0555",
                    new Object[] { exception, messagingEngine.getName(),
                            messagingEngine.getBusName(), this });

            // To reach this point would mean a more serious error has occurred like
            // the destination does not exist. Deactivate the MDB so that the user
            // knows there is a problem. This behaviour is consistent with the MDB
            // being deactivated if the MDB fails during initial startup (an exception
            // thrown to J2C and they would deactivate the MDB).
            deactivate();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }