func New(sid, token, phoneNumber string, timeout uint, enableMessageConcatenation bool) (*Config, error) {
	if sid == "" {
		return nil, errors.New("no account sid specified")
	}
	if token == "" {
		return nil, errors.New("no authentication token specified")
	}
	if phoneNumber == "" {
		return nil, errors.New("no Twilio phone number specified")
	}

	// https://support.twilio.com/hc/en-us/articles/223181508-Does-Twilio-support-concatenated-SMS-messages-or-messages-over-160-characters-
	maxLen := 160
	if enableMessageConcatenation {
		maxLen = 1600
	}

	return &Config{
		AccountSid: sid,
		authToken:  token,
		From:       phoneNumber,
		MaxMsgLen:  maxLen,
		Timeout:    time.Second * time.Duration(timeout),
	}, nil
}
// New returns a Twiligo instance initialized using the specified parameters. It returns an error if initialization failed.
New returns a Twiligo instance initialized using the specified parameters. It returns an error if initialization failed.
// New returns a Twiligo instance initialized using the specified parameters . It returns an error if initialization failed .
func New(sid, token, phoneNumber string, timeout uint, enableMessageConcatenation bool) (*Config, error) {
	if sid == "" {
		return nil, errors.New("no account sid specified")
	}
	if token == "" {
		return nil, errors.New("no authentication token specified")
	}
	if phoneNumber == "" {
		return nil, errors.New("no Twilio phone number specified")
	}
	maxLen := 160
	if enableMessageConcatenation {
		maxLen = 1600
	}
	return &Config{
		AccountSid: sid,
		authToken:  token,
		From:       phoneNumber,
		MaxMsgLen:  maxLen,
		Timeout:    time.Second * time.Duration(timeout),
	}, nil
}
func New ( sid , token , phoneNumber string , timeout uint , enableMessageConcatenation bool ) ( * Config , error ) { if sid == " " { return nil , errors . New ( " " ) } if token == " " { return nil , errors . New ( " " ) } if phoneNumber == " " { return nil , errors . New ( " " ) } maxLen := 160 if enableMessageConcatenation { maxLen = 1600 } return & Config { AccountSid : sid , authToken : token , From : phoneNumber , MaxMsgLen : maxLen , Timeout : time . Second * time . Duration ( timeout ) , } , nil }
New returns a Twiligo instance initialized using the specified parameters.
New returns a Twiligo instance initialized using the specified parameters .
// https://support.twilio.com/hc/en-us/articles/223181508-Does-Twilio-support-concatenated-SMS-messages-or-messages-over-160-characters-