You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a new campaign using the MailerLite PHP SDK, MailerLite is automatically adding code to the bottom of the HTML content even when the Unsubscribe tag is present in the 'content' parameter being passed to MailerLite API and the "Automatically generate a footer from the company details." is unchecked in the Account Settings. If you edit the HTML content in the MailerLite UX, the code disappears.
Expected Results
A campaign would be created containing only my HTML code that was in the 'content' parameter. In the below example, it is <p>Thanks for the email. <a href="{$unsubscribe}">Unsubscribe</a></p>.
Actual Results
The following code is inserted below the HTML code in the 'content' parameter.
Add any HTML into the 'content' parameter. I added: <p>Thanks for the email. <a href="{$unsubscribe}">Unsubscribe</a></p>
From the command line, run your PHP file to create the campaign.
The campaign should be created in your MailerLite account and, when you preview the created campaign, you should see the extra code inserted. Here's a preview of a campaign I created via the MailerLite PHP SDK: https://preview.mailerlite.io/preview/692096/emails/107481786535118262
For the above steps to reproduce, here's the entirety of my PHP file:
require'vendor/autoload.php';
useMailerLite\MailerLite;
$mailerLite = newMailerLite(['api_key' => '{my API key went here}']);
$data = [
'type' => 'regular',
'name' => '{my campaign name went here}',
'language_id' => 4,
'emails' => [
[
'subject' => '{my subject went here}',
'from_name' => '{my name went here}',
'from' => '{my verified email address went here}',
'content' => '<p>Thanks for the email. <a href="{$unsubscribe}">Unsubscribe</a></p>',
]
],
'filter' => [],
];
$response = $mailerLite->campaigns->create($data);
The text was updated successfully, but these errors were encountered:
codiller
changed the title
PHP SDK Adding MailerLite Footer
MailerLite PHP SDK Adding HTML Content
Dec 13, 2023
Summary
When creating a new campaign using the MailerLite PHP SDK, MailerLite is automatically adding code to the bottom of the HTML content even when the Unsubscribe tag is present in the 'content' parameter being passed to MailerLite API and the "Automatically generate a footer from the company details." is unchecked in the Account Settings. If you edit the HTML content in the MailerLite UX, the code disappears.
Expected Results
A campaign would be created containing only my HTML code that was in the 'content' parameter. In the below example, it is
<p>Thanks for the email. <a href="{$unsubscribe}">Unsubscribe</a></p>
.Actual Results
The following code is inserted below the HTML code in the 'content' parameter.
Steps to Reproduce
<p>Thanks for the email. <a href="{$unsubscribe}">Unsubscribe</a></p>
For the above steps to reproduce, here's the entirety of my PHP file:
The text was updated successfully, but these errors were encountered: