Hi
I am having a small issue with sendmailing function in the webservice api.
After setting up a mailing by the following steps
step 1 createContentModule
step 2 saveContentModuleContent
create mailing
step 3 AddMailing (Here I am adding two texts for html and text version)
$data = array(
"mailingID" => $mailingid,
"blockName" => $htmlBlockName,
"targetID" => 0,
"content" => "This is html text content.",
"order" => 1
);
AddContentBlock($data)
$data = array(
"mailingID" => $mailingid,
"blockName" => $textBlockName,
"targetID" => 0,
"content" => 'This is text version of email.',
"order" => 2
);
AddContentBlock($data)
Step 4 addMailingBindings
Step 5 SendMailing
After Running SendMailing all the emails send out only contains text "This is html text content.".
But after step4 if I login to openemm admin area through "http://localhost:8080/" and try "send" button of mailing its always fine and correctly sends the html email from the template.
Anyone please help ? really stuck at this last step
SendMailing webservice api issue
Moderator: moderator
SendMailing webservice api issue
Last edited by abinpaulr on Sun Oct 11, 2015 5:27 pm, edited 1 time in total.
-
- Site Admin
- Posts: 2611
- Joined: Thu Aug 03, 2006 10:20 am
- Location: Munich, Germany
- Contact:
Re: SendMailing webservice api issue
I do not understand
function ManageAdvertController>>actionCreate_advertmeta
OpenEMM Maintainer
Re: SendMailing webservice api issue
Hi
Sorry please neglect that that line, its from my code (php)
Thank You
Abin
Sorry please neglect that that line, its from my code (php)
Thank You
Abin
-
- Posts: 25
- Joined: Fri Jan 04, 2013 8:55 am
Re: SendMailing webservice api issue
Hi!
The problem in your client is, that you're mixing public and non-public webservice methods. createContentModule and saveContentModuleContent are part of the non-public API. Mailings created with public API (AddMailing) will not be able to use resources created with non-public API.
You have to use public API only. See webservice documentation.
Here is a generic workflow to create a new mailing and fill its content:
First, you have to create a new mailing by calling AddMailing. This webservice will return you the ID of the new mailing.
Use this mailing ID with AddContentBlock to fill the content of the mailing. AddMailing created content block "Text-Version" and "Html-Version" by default. (You can use ListContentBlockNames to list all available content block names for your mailing.)
After filling the mailing content, use SendMailing to deliver your mailing.
Best regards,
Markus
The problem in your client is, that you're mixing public and non-public webservice methods. createContentModule and saveContentModuleContent are part of the non-public API. Mailings created with public API (AddMailing) will not be able to use resources created with non-public API.
You have to use public API only. See webservice documentation.
Here is a generic workflow to create a new mailing and fill its content:
First, you have to create a new mailing by calling AddMailing. This webservice will return you the ID of the new mailing.
Use this mailing ID with AddContentBlock to fill the content of the mailing. AddMailing created content block "Text-Version" and "Html-Version" by default. (You can use ListContentBlockNames to list all available content block names for your mailing.)
After filling the mailing content, use SendMailing to deliver your mailing.
Best regards,
Markus