API Module Email Templates modifyEmailTemplateRequest
From Openprovider API documentation
Contents |
Module Email Templates > Modify
Module | Email Templates |
Command name | modifyEmailTemplateRequest |
Use | Modify content of an existing email template
Note: It is much more convenient to modify e-mail template for reseller control panel |
Input |
|
Output |
|
Examples
Using PHP class
$request = new OP_Request; $request->setCommand('modifyEmailTemplateRequest') ->setAuth(array('username' => 'username', 'password' => 'password')) ->setArgs([ 'id' => 1234, 'name' => 'Demo template', 'isDefault' => true, 'isActive' => true, 'locale' => ['nl_NL'], 'fields' => [ [ 'name' => 'senderEmail', 'value' => 'myemail@mycompany.eu', ], [ 'name' => 'confirmUrl', 'value' => 'http://icann-verification.registrar.eu/?email=%%email%%&authCode=%%authCode%%', ], [ 'name' => 'resellerName', 'value' => 'demo Co', ], [ 'name' => 'subject', 'value' => 'Initial E-mail verification', ], [ 'name' => 'body', 'value' => '%%confirmUrl%% and %%respondDate%%', ], [ 'name' => 'reminderSubject', 'value' => 'Email verification reminder', ], [ 'name' => 'reminderBody', 'value' => '%%confirmUrl%% and %%respondDate%%', ], ], ]);
Raw XML
Please note that newlines and leading spaces are added only for readability. Those whitespaces should be excluded from your XML command before sending it to Openprovider.
<?xml version="1.0" encoding="UTF-8"?> <openXML> <credentials> <username>username</username> <password>password</password> </credentials> <modifyEmailTemplateRequest> <id>1234</id> <name>Demo template</name> <isDefault>0</isDefault> <isActive>1</isActive> <locale> <array> <item>en_US</item> </array> </locale> <fields> <array> <item> <name>senderEmail</name> <value>do-not-reply@registrar.eu</value> </item> <item> <name>confirmUrl</name> <value>http://icann-verification.registrar.eu/?email=%%email%%&authCode=%%authCode%%</value> </item> <item> <name>resellerName</name> <value>demo Co</value> </item> <item> <name>subject</name> <value>My subject Email verification</value> </item> <item> <name>body</name> <value>%%confirmUrl%% and %%respondDate%%</value> </item> <item> <name>reminderSubject</name> <value>My Email verification reminder</value> </item> <item> <name>reminderBody</name> <value>%%confirmUrl%% and %%respondDate%%</value> </item> </array> </fields> </modifyEmailTemplateRequest> </openXML>
<?xml version="1.0" encoding="UTF-8"?> <openXML> <reply> <code>0</code> <desc></desc> </reply> </openXML>