code-quantum / elasticemail-go

Go library for interacting with the ElasticEmail API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

Go library for interacting with the ElasticEmail API.

Supported methods

  • Email:

    Send your emails and see their statuses

    • GetStatus
    • Send
    • Status
    • View
  • Template:

    Managing and editing templates of your emails

    • GetList
  • List:

    API methods for managing your Lists

    • list
  • Contact:

    Methods used to manage your Contacts.

    • Add

Usage

        ee := elasticemail.NewElasticEmail("api-key")
        
        //send email
	to := make([]string, 1)
	to[0] = "abc@gmail.com"
	sendEmail, err := ee.Send(elasticemail.SendParams{To: to, BodyHtml: "<b>Hello!</b>", Subject: "Hello", From: "noreply@eeee.eee"})
	if err!= nil {
		log.Fatal(err.Error())
	}
	
	// get status:
    	status, err := ee.GetEmailStatus(elasticemail.GetEmailStatusParams{TransactionID: sendEmail.TransactionID})
    	if err != nil {
    		log.Fatal(err.Error())
    	}

About

Go library for interacting with the ElasticEmail API.

License:MIT License


Languages

Language:Go 100.0%