Plands.com Logo  Business Internet Services 
Main Menu
Home
Planetary CRM
  Benefits
  Features
  Demo
E-Mail Services
  E-mail Hosting
  Newsletters
  Discussion Lists
Web Hosting
Server Co-location
and Administration
Web Applications
Technical Support
Contact Us
DXP Samples
 
DxpHome  ||   Samples  ||   Details  ||   Docs  ||   Trees  ||   xml-xsl  ||   Links
// SendBulkMail.java

The SendBulkMail tag is used to send separate emails to multiple recipients with content produced at runtime. The content of each msg can be customized for each recipient.

The SendBulkMail tag has fixed attributes for mailserver, debug and storeMsg. The mailserver attribute can be single value or be a comma delimited list. If the first one fails the next one in the list is tried.

The child tags named 'subject' and 'from' are single value Parameter tags. The child tags named to' and 'content' are ArrayParameters that may contain multiple values. Each value of the 'to' tag will receive a msg with the corresponding 'content' value.

If the debug attribute is set to true the mailserver won't be contacted and no msg is sent. You can use this to store the msg and print display it for testing before sending real mail. To display the msg on the page set storeMsg to true. The runtime content and parameters will stored under the keys msg.to, msg.from, msg.replyto, msg.cc, msg.bcc, msg.subject, and msg.content and can be displayed using Rp tags.

In this example email addresses are obtained from a database query


<dxp:DbStmt action="query" dbcon="rudecompany" store="list">
   <dxp:Cp name="sql">select email from spamtable</dxp:Cp>
</dxp:DbStmt>

<dxp:StringMatrix action="getCol" col="0" store="to">
   <dxp:Rs name="list"/>
</dxp:StringMatrix>

<dxp:Cp name="content">Buy our new product. Guranteed to make you rich.</dxp:Cp>

<dxp:SendBulkMail mailserver="mail.plands.com" store="result">
   <dxp:Rp name="from" default="webmaster@bwtag.net"/>
   <dxp:Rp name="subject" require="true"/>
   <dxp:Ap name="to" require="true"/>
   <dxp:Ap name="content" require="true"/>
</dxp:SendBulkMail>


@author Mark Ashworth
@version 0.1, 2001-06-07

Return to Index

Note: We have tried to test all of the code examples but they may contain errors. Any questions, comments, suggestions, or problems should be sent to info@plands.com.