Ir para o conteúdo
Mostrar cesto Esconder cesto
Você está aqui: Manual » Plugins » SendEmailPlugin

SendEmailPlugin

Allows to send e-mails through an e-mail form.

Usage

  • Create a HTML form using RawHTMLBlock that invokes the {sendemail} action
  • Add a “to” and “message” field and a submit button
  • Make sure to fill in allowed ‘to’ addresses in plugin settings

HTML form

Form action

You should use {sendemail} macro as form action, it will be expanded as:

  • /profile/<identifier>/plugin/send_email/deliver in profile context
  • /plugin/send_email/deliver in environment context

‘Subject’ field

Subject of message.

(default: ‘New mail’)

‘Message’ field

Body of message.

(required)

‘To’ field

Target address. Accepts multiple addresses separated by comma.

(required)

extra fields

Each other params in HTML form will compose message body in a format “key: value”

Example

<form action='{sendemail}' method='post'>
   To: <input type='text' name='to'/>
   Subject: <input type='text' name='subject'/>
   Message: <input type='text' name='message'/>
   <input type='submit'/>
</form>

Options

Using ajax

Ajax is supported using #ajax-form as id of HTML form.

Example:

<form action='{sendemail}' id='ajax-form'>
   To: <input type='text' name='to'/>
   Subject: <input type='text' name='subject'/>
   Message: <input type='text' name='message'/>
   <input type='submit'/>
</form>

Info

This plugin was inspired by Foswiki SendEmailPlugin