Giter Club home page Giter Club logo

mandrill's People

Contributors

jatochnietdan avatar kvannotten avatar mostafah avatar mrtravisb avatar mvmaasakkers avatar ripexz avatar rjz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mandrill's Issues

Allow non-string merge variables

Mandrill's merge_vars allow nested JSON data (e.g. for use with handlebars-enabled templates), but the current variable definition restricts variables to string content. Let's consider expanding the type to let client users specify variables in additional formats.

mandrill.Ping does not error on invalid API keys

Hey,

package main
import  "github.com/mostafah/mandrill"
import  "fmt" 

func main() {
    mandrill.Key = ""
    err := mandrill.Ping()
    if err != nil {
        fmt.Println("Mandrill credentials not valid.")
    } else {
        fmt.Println("Everything ok.")
    }
}

always yields "Everything ok." for me. This happens with all kind of random text. I'm on OS X (if that helps you).

Keep up the work, I like your mandrill package for its simplicity.

On a side node, the Message.Send() method doesn't error out as well for me when sending with an invalid key. Should I open a seperate issue for that?

To support Mandrill merge vars when sending templates call AddGlobalMergeVars

The example chains the call to SendTemplate from the msg. This only supports dynamic sections (e.g. mc:edit replacement).

If you plan to use merge vars (|YOURVAR|) you need to do the intermediate step of adding global merge vars...

    msg := mandrill.NewMessageTo(email, name)
    msg.AddGlobalMergeVars(data)
    result, err := msg.SendTemplate(tmplName, data, true)

Very elegant library and one file. I came across this before seeing https://github.com/mattbaird/gochimp and this project does everything I need. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.