func SendSMS(toNumber, message string) error { accountSid := os.Getenv("Twilio_AccoutSid") authToken := os.Getenv("Twilio_AuthToken") fromNumber := os.Getenv("Twilio_Number") c := twilio.New(accountSid, authToken, fromNumber) err := c.Send(toNumber, message) if err != nil { return err } return nil }
func newTwilio(c *config.Twilio) Twilio { return Twilio{ clnt: twilio.New(c.Key, c.Token, c.FromPhone), } }