Releases: kayode0x/plunk
Releases · kayode0x/plunk
v0.1.6
New change
You can now link data to contacts on triggering an event.
Example:
p, _ := plunk.New("<YOUR_SECRET_KEY>", nil)
evt := EventPayload{
Event: "send:alert",
Email: "hello@useplunk.com",
Data: map[string]any{
"alert": "Your server is down!",
"link": "https://example.com",
},
}
res, _ := p.TriggerEvent(evt)
New contributor
v0.1.5
New change
In SendTransactionalEmail
and SendMultipleTransactionalEmails
, by specifying the from and name fields, you can customize the from address and name of the email. If you don't specify these fields, the default address and name configured in your project settings will be used.
Example:
p, _ := plunk.New("<YOUR_SECRET_KEY>", nil)
payload := TransactionalEmailPayload{
From: "billing@useplunk.com",
Name: "Plunk Billing",
To: "hello@useplunk.com",
Subject: "Welcome!",
Body: "Hello",
}
res, _ := p.SendTransactionalEmail(payload)
v0.1.4
Breaking Changes
- Configurations:
Instead of using a function for configurations, they are now an object. Update your implementation as follows:
config := &plunk.Config{
BaseUrl: "https://api.useplunk.com",
Debug: true,
Client: &http.Client{
Timeout: 10 * time.Second,
},
}
// Create a new Plunk object with your API key and config
p, err := plunk.New("YOUR_API_KEY", config)
if err != nil {
fmt.Printf("Error creating Plunk object: %v", err)
return
}
- Function Updates:
The following functions no longer require a pointer reference as a parameter:
- SendTransactionalEmail
- SendMultipleTransactionalEmails
- CreateContact
- TriggerEvent
Please update your code accordingly to avoid issues.
v0.1.3
v0.1.1
I'm excited to announce the initial release of the Plunk Go SDK, a new way for SaaS companies to send, track, and optimize their emails using the Plunk platform. With this SDK, you can easily integrate Plunk's email capabilities into your Go applications and start driving more revenue from your email campaigns.