Comments (4)
It should work.
I tested this feature around one month ago with the version 6.0.0 of this library and it worked for me.
You have to be sure that file extension is allowed:
https://developers.sendinblue.com/v3.0/reference#sendtemplate
and also you should to encode the file, like in the following example code:
$content = chunk_split(base64_encode(file_get_contents($filepath)));
$attachment[] = new SendSmtpEmailAttachment(['content' => $content, 'name' => $filename]);
$mailer->setAttachment($attachment);
from apiv3-php-library.
hm, interesting! It's even in the documentation:
see attachment
( Ignored if 'templateId' is passed )
https://github.com/sendinblue/APIv3-php-library/blob/master/docs/Model/SendSmtpEmail.md
from apiv3-php-library.
Karsten, you are right, the attachments doesn't with templates
I have tested a few minutes ago with my own library and it doesn't work, however I implemented the functionality for attachments (Maybe in the future...).
from apiv3-php-library.
Hi @karsten-eger @JuanLeadSupply
If templateId is passed and is in New Template Language format then both attachment url and content are accepted. If template is in Old template Language format, then attachment is ignored
See here
from apiv3-php-library.
Related Issues (20)
- php 8.1 compatibility HOT 7
- Sales CRM - companies and deals HOT 1
- Webhooks API: getWebhook throws: Invalid value for 'type', must be one of 'marketing', 'transac' HOT 2
- Difficulties to install API v3 HOT 3
- Problems with the package HOT 1
- Multiple recipients only sends to last in array HOT 1
- SendinBlue\Client\Configuration" not found HOT 2
- Issue about removeContactFromList api HOT 1
- createDoiContact throws exception with "This sms number or email address is already associated with another user" for blacklisted users
- How can we set preview text of email campaign
- GetEmailCampaigns & new parameter HOT 4
- Create Or Update Contact with unlinkListIds HOT 1
- ContactsAPI updateBatchContacts results in 404 when one of emails not found HOT 1
- Missing domain managements routes in the SDK HOT 2
- Error "message":"to is not valid in messageVersions"
- Brevo API Endpoint migration HOT 3
- Guzzle Error with SDK 8.4.2 & php 7.4.3 HOT 1
- ContactsAPI Unable to create a list
- getContactsInfo without statistics?
- Send test template is there, but send template is not (on the smtpclient)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apiv3-php-library.