Home / Mail / save

Mail ‐ save


Description:

create a new mail or update a existing one. When you want to update a existing mail you will need to give a mail_id parameter

The following errors can occur:
- Please use post as a request method
- The parameter from_email is not a valid email address
- The parameter reply_to_email is not a valid email address
- The parameter name is mandatory when creating a new mail.
- The parameter subject is mandatory when creating a new mail.
- The parameter reply_to_email is mandatory when creating a new mail.
- The parameter language_id is mandatory when creating a new mail.
- Missing the parameter file.
- This mail_id doesn't exists or isn't a upload mail!
- mail_id is not a integer
- The parameter change_form_template_id is not a integer
- The parameter subscribe_form_template_id is not a integer
- The parameter unsubscribe_form_template_id is not a integer
- The parameter tellafriend_form_template_id is not a integer
- The parameter optin_form_template_id is not a integer
- The parameter reaction_form_template_id is not a integer
- The parameter folder_id is not a integer
- No parameters has been set!
- The name parameter is too long: max 80 characters
- The description parameter is too long: max 255 characters
- The to_name parameter is too long: max 128 characters
- The from_name parameter is too long: max 128 characters
- The from_email parameter is too long: max 128 characters
- The reply_to_name parameter is too long: max 128 characters
- The reply_to_email parameter is too long: max 128 characters
- The subject parameter is too long: max 255 characters
- The change_form_template_id doesn't exists
- The subscribe_form_template_id doesn't exists
- The unsubscribe_form_template_id doesn't exists
- The unsubscribe_form_template_id doesn't exists
- The unsubscribe_form_template_id doesn't exists
- The unsubscribe_form_template_id doesn't exists
- One of the parameter is not known.
- Something went wrong with creating the mailing.
- This mail is not a upload mail
- This mail_id doesn't exists!
- referer cannot be empty
- The referer parameter is too long: max 255 characters

Example:

Parameters:

The following parameters this method can/should be called with:

key: mail_id
values: integer
what: This is the id of the mail that you want the information from. mandatory if you want to update a mail

key: change_form_template_id
values: integer
what: Id of the form for connecting the change form

key: subscribe_form_template_id
values: integer
what: Id of the form for connecting the subscribe form

key: unsubscribe_form_template_id
values: integer
what: Id of the form for connecting the unsubscribe form

key: tellafriend_form_template_id
values: integer
what: Id of the form for connecting the tellafriend form

key: optin_form_template_id
values: integer
what: Id of the form for connecting the optin form

key: reaction_form_template_id
values: integer
what: Id of the form for connecting the reaction form

key: name
values: string (80 characters)
what: The name of mail what you see in emark mail

key: description
values: string (255 characters)
what: The description of the mail

key: to_name
values: string (128 characters)
what: The name of the email address where you want to mail to

key: from_name
values: string (128 characters)
what: The name of the email address where you want to mail from

key: from_email
values: string:valid email address (128 characters)
what: The email address where you want to mail from

key: reply_to_email
values: string:valid email address (128 characters)
what: The email address where you want to mail from

key: subject
values: string (255 characters)
what: The subject of the mail

key: referer
values: string (255 characters)
what: You can add a tracking parameter to use in your campaign.

key: folder_id
values: integer
what: the id of the folder where you want to file the mail under.

key: language_id
values: integer
what: The id of the language where you want to connect the mail to. If the DB has multiple languages, then this is mandatory.

key: file
values: file
what: The file what you want to upload. This file can be an html file or a zip file with images and the html. Call this like: "$options['file'] = @' . realpath($file) . ';filename=' . basename($file);" or like "$options['file'] = new CurlFile($file);"

See:

The following items:
- user/login For the TOKEN
- user/database For the DATABASE_ID