func ComposeMessage(addressing message.Addressing, subject string, b, a []string) error {
	envelope, err := message.Compose(addressing, subject, b, a)
	if err != nil {
		return err
	}

	// Setup API connection to the server
	client, err := api.NewAuthenticated(*addressing.Sender.Address, *addressing.Sender.PrivKey, addressing.Sender.Host, internal.JwtErrorFunc)
	if err != nil {
		return err
	}

	// and finally send
	err = messages.Send(*client, envelope)
	if err != nil {
		return err
	}
	return nil
}
// ComposeMessage composes a new message from the given account Info to the "to" with given subject, blocks and attachments
ComposeMessage composes a new message from the given account Info to the "to" with given subject, blocks and attachments
// ComposeMessage composes a new message from the given account Info to the " to " with given subject blocks and attachments
func ComposeMessage(addressing message.Addressing, subject string, b, a []string) error {
	envelope, err := message.Compose(addressing, subject, b, a)
	if err != nil {
		return err
	}
	client, err := api.NewAuthenticated(*addressing.Sender.Address, *addressing.Sender.PrivKey, addressing.Sender.Host, internal.JwtErrorFunc)
	if err != nil {
		return err
	}
	err = messages.Send(*client, envelope)
	if err != nil {
		return err
	}
	return nil
}
func ComposeMessage ( addressing message . Addressing , subject string , b , a [ ] string ) error { envelope , err := message . Compose ( addressing , subject , b , a ) if err != nil { return err } client , err := api . NewAuthenticated ( * addressing . Sender . Address , * addressing . Sender . PrivKey , addressing . Sender . Host , internal . JwtErrorFunc ) if err != nil { return err } err = messages . Send ( * client , envelope ) if err != nil { return err } return nil }
ComposeMessage composes a new message from the given account Info to the "to" with given subject, blocks and attachments
ComposeMessage composes a new message from the given account Info to the " to " with given subject blocks and attachments
// Setup API connection to the server // and finally send