Email Media


Media email

/action/v2/emailmedia

This action allows a user to email a message to a friend; the email can contain a link to a media, hence the action name: `Email Media`.

Requirements For The Action

The `Media Email` action supports the params of the fm:Form component

All optional params can be set as required in the `Media Actions` tab of the applicationsettings page; in the `emailmedia` params, you can set the email message and captcha values as Required or Optional.

How To Use The `Email Media` Action

  • In the application templates, create the `Email Media` Form as shown in Example 1 below
  • In the application email templates, create the `emailmedia` Email Template, as shown in Example 2.
    *** NOTE: *** Make sure to name the email template `emailmedia`

Example 1: `Email Media` Form

<fm:Form action="/action/v2/emailmedia" method="post"> <fm:Form_Custom><input type="hidden" name="mid" value="" /></fm:Form_Custom> <fm:Form_Custom><input type="hidden" name="redirectUrl" value="/home" /></fm:Form_Custom> <fm:Form_Custom><input type="text" name="sender_name" /></fm:Form_Custom> <fm:Form_Email name="sender_email" /> <fm:Form_Custom><input type="text" name="recipient_name" /></fm:Form_Custom> <fm:Form_Email name="recipient_email" /> <fm:Form_Custom><input type="text" name="message" /></fm:Form_Custom> <fm:Form_Captcha value="Enter the text in the image" name="captcha" /> <fm:Form_Custom><button type="submit">Send email</button></fm:Form_Custom> </fm:Form>

Paramaters Supported by the `Email Media` action

Name Required Description
mid Required The media id of the file. Must be an integer.
sender_email Required Email of the person sending a link . Must be a valid email. Limited to 100 chars.
sender_name Required Name of the person sending a link. Must be a valid email. Limited to 100 chars.
recipient_email Required Email of the person to send the media page link to. Must be a valid email. Limited to 100 chars.
recipient_name Required Name of the person to send the media page link to. Must be a valid email. Limited to 100 chars.
message Optional Personal message to include in the email. Text, limited to 65000 chars.
captcha Optional The captcha validation for the form.
redirectUrl Optional The URL of the page that you want the actio to redirect to after it has sent the email. Maximum length of the redirectUrl is 100 characters.

Example 2: `emailmedia` Email Template

Hello {$recipient_name}, <BR> Your friend {$sender_name} has shared this media link with you: <BR> {$application_domain}/mediadetail/{$mid} <BR><BR> Take a look and tell us if you like it!<BR>

Paramaters Supported by the `emailmedia` Email Template

Name Required Description
mid Optional The id of the media.
sender_email Required Email of the person sending a link . Must be a valid email. Limited to 100 chars.
sender_name Required Name of the person sending a link. Must be a valid email. Limited to 100 chars.
recipient_email Required Email of the person to send the media page link to. Must be a valid email. Limited to 100 chars.
recipient_name Required Name of the person to send the media page link to. Must be a valid email. Limited to 100 chars.
message Optional Personal message to include in the email. Text, limited to 65000 chars.
vhost Optional The id of the application.
application_domain Optional The domain of the application.