Documentation > Tags Reference > send_mail

send_mail

The send_mail tag, as the name suggests, can be used to send emails.

<cms:send_mail from='admin@mysite.com' to='johndoe@gmail.com' subject='Feedback from your site'>
Anything here (between the opening and closing tags of send_mail) 
will form the body of the email that will be sent.
</cms:send_mail>

Anything enclosed within the opening and closing tags will form the body of the message to be sent.
Each line should be separated with a LF (\n). Lines should not be larger than 70 characters

For now only plain text email is supported. There is no provision (yet) for attachments.

Parameters

from

Sender's email address.

to

Receiver, or receivers of the mail.

The formatting of this string must comply with » RFC 2822. Some examples are:

user@example.com
user@example.com, anotheruser@example.com
User <user@example.com>
User <user@example.com>, Another User <anotheruser@example.com>

subject

Subject of the email.

debug

If set to '1', all send emails will be logged. The file used for logging can be set by the logfile parameter below.

logfile

This can be set to the log file used to save all send emails. The file can be given a path relative to the site's root. If skipped, a log file named 'log.txt' in the site's root will be used (will be created if not present)

Variables

This tag does not set any variables.