Skip to content

Golang library for Amazon Web Services - Simple Email Service (AWS - SES)

License

Notifications You must be signed in to change notification settings

therahulprasad/goAWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goAWS

Golang library for Amazon Web Services - Simple Email Service (AWS - SES)

Installation

go get github.com/therahulprasad/goAWS

Usage

/**
  * @Argument:
  *     STRING: to, subject, body, from, toName, fromName, replyTo, replyToName
  * @Returns
  *     http://docs.aws.amazon.com/ses/latest/DeveloperGuide/query-interface-responses.html
  *     INT StatusCode => Code return by SES 
  *     SuccessXmlResponse by SES (Struct defined in ses.go, it contains MessageId and RequestId)
  *     ErrorXmlResponse by SES (Struct defined in ses.go, it contains Type, Code, Message, RequestId)
  *     err => error while Unmarshaling, error during http request
  */
StatusCode, SuccessXmlResponse, ErrorXmlResponse, err := SendSingleMail(to, 
                                                                        subject, 
                                                                        body, 
                                                                        from, 
                                                                        toName, 
                                                                        fromName, 
                                                                        replyTo, 
                                                                        replyToName);
// If you dont worry about error code 
_, _, _, err := SendSingleMail(to, subject, body, from, toName, fromName, replyTo, replyToName);
if err != nil {
 // Email reached SES
}
// If you care about error
_, _, ErrorXmlResponse, err := SendSingleMail(to, subject, body, from, toName, fromName, replyTo, replyToName);
if err != nil && ErrorXmlResponse.Code == "" {
 // Email reached SES and There was no Error on SES
} else if err != nil {
 // Email reached SES by There was an error on ses
 fmt.Println(ErrorXmlResponse.Message)
}

Note:

Volunteers needed, alot can be enhanced in this library.
  1. Need someone to write test cases
  2. Need help to add alot of features

About

Golang library for Amazon Web Services - Simple Email Service (AWS - SES)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages