The MAILTO element is used for sending e-mails using a POP3/SMTP email account.
Syntax
<#MAILTO>
<#TOADDRESS> addresses <#/TOADDRESS>
<#TOCARBONCOPY> CCAddresses <#/TOCARBONCOPY>
<#TOBLINDCCOPY> BCCAddresses <#/TOBLINDCCOPY>
<#SUBJECT> asubject <#/SUBJECT>
<#BODY>
Body of the message.
<#/BODY>
<#/MAILTO>
TOADDRESS
Specify in addresses all the recipients emails separated by a colon to which the mail will be sent.
TOCARBONCOPY
Specify in CCaddresses all the recipients emails separated by a colon to which a copy the mail will be sent.
TOBLINDCCOPY
Specify in BCCaddresses all the recipients emails separated by a colon to which a blind copy the mail will be sent.
SUBJECT
Specify inside the subject tag the subject of the e-mail.
BODY
Specify inside the body tag the body of the message.
Note: You can use inside of these delimiters any other DBSP element (like datasets, ifs, etc). This give you the flexibility of create almost any kind of personalized e-mails based on your database data.
Note: By the moment, email attachments are not supported.
Email Account Configuration
Before you can use the MAILTO element, you must configure the account settings using the DBSP Configuration tool. Here you must indicate this information: Mail Server, POP3 Port, SMTP port, username and password. You could obtain this information from your ISP or network administrator.
Applications
Use the MAILTO element to send an email as a notification of certain actions that your users perform in your site (like registering or changing your information or placing an order).
Examples
Example 1. Sending a simple mail using the DBSPTech.com mail agent account.
The following example shows how to display the data obtained with a simple SELECT statement using a DATASET tag.
please provide your email for sending you a test email message.
<#if expression="txtemail!=undef">
message has been sent to <#txtemail/>.
<#mailto> <#toaddress> <#txtemail/> <#/toaddress> <#subject> test mail of the dbsp mail tag <#/subject> <#body> this is the body of the message. welcome to dbsp. <#/body> <#/mailto> <#/if>