| How To Send Email
   This topic gives you the steps for sending  emails from Collect!.  This requires experience creating
   reports in Collect! and may require familiarity with the HTML language and creating HTML pages.
 
 Please refer to the Help Topics  How To Setup Sending Email In Collect! for information on
          setting up emailing.   By default Collect! will send emails as plain text. The text that you put in to the report writer
  gets converted by the system to HTML before transmitting.
   Collect! also has the facility to let you code your own HTML. This enables you to design reports
  using columns or tables. Format them to display nicely as HTML and they will retain their spacing
  and columns when printed to email.
 
 You must be using SMTP. This feature is not recommended for MAPI, unless you have an email
           client that supports HTML emails from a third party application. SMTP (Simple Mail Transfer
          Protocol) is a standard mail transfer protocol. With more and more restrictions in the later
          releases of Windows, we recommend using SMTP with an email server. Please refer to
          How To Setup Sending Email In Collect! for setup details.   You must be sure the first line of your report is <html> so the email
  engine can apply the HTML Content Type  header.
 Enabling SMTPPlease refer to the Help topic  How To Setup Sending Email In Collect! for setup details.
  
 Building A Report Or Letter   
    Using Collect!'s Report Writer, create a report that starts on  Debtor or
        Client depending on who the recipient is.Manually code the report into the  report body just as you would to create any report. For HTML
        code the report as if you were coding a web page, making sure that the first line of the report
        is @no html, then the second line is @no html wrapper, then
        the third line is <html>. Use printable information codes to pull
        information from the database just as you would in a normal report. You can wrap these codes
        in HTML for formatting tables, and columns.Set the Destination for the report in the  Report Options to be Email.  
 Sending An Email Via The Report   
    Open or tag one or more Clients or Debtors. Please ensure that their email addresses are
        valid.Select Print from the top menu bar and then select the report you want to print.When the  Print Report form displays, select Email, if not already selected,
        as the destination for the report's output.If applicable, select the option to skip records with blank emails or the option to CC
         Cosigners.Click the print button and say yes to the prompt to email X number of records. 
 If you run the print batch on a tagged list, you will be prompted with the option to print
          to one or all records. Select All. 
 When a letter is printed to email, Collect! will save the  Contact as a email contact, not
          a letter contact. The Description field will contain the name of the Letter that was emailed.
          It is set to type Email for tracking purposes.  
 Sending An Email Via The Send Mail Form  This option is similar to composing an email in an email client. It is for ad-hoc emailing.
    
    Open a Client or Debtor.Click on the image button next to the email field (or double click the field) to open the
         Send Mail form.Compose your email and click Send. 
 When you click the  Attachment browse button, it will open to the Debtor's attachment folder
          in the global folder.  
 Attaching A Pdf To An Email Sent Via A Report  This is a useful option if you want to send an email with a promotional attachment or to send a plain
  text email with a formatted letter.
   Please refer to the following Help links on how to use the @PDF and @WKOPTIONS commands. Below are
  some examples of code.
  
 Example 1 - Plain Text Email With AttachmentDear @de.co<,
Please find your receipt attached.
@tvarDate! = 01/01/1960
@tvarAmount$ = 0.00
@de.tr no total where ( @tr.pa = x ) max = 1
@tvarDate = @tr.pda
@tvarAmount$ = @(tr.tu+tr.di)
@de.tr
@PDF start
<html>
<body>
<p>  @cd.na< <br />
  @cd.ad< <br />
  @cd.ci<, @cd.st< @cd.zi< <br />
  Phone: @cd.ph< <br />
  Fax: @cd.fa< <br />
</p>
<p>@e</p>
<p> </p>
<p>@de.na< <br />
  Our Client.........: @de.cl< <br />
  Client Acct#.....: @de.ac< <br />
  Our Acct#........: @de.fi< <br />
  Balance............: @de.ow< </p>
<p> </p>
<p> <u>RECEIPT OF PAYMENT</u></p>
<p>@de.co<:</p>
<p>  Thank you for your payment towards the above referenced account. Your payment was <br />
  received on  <strong><u>@tvarDate<10></u></strong> in the amount of <strong>
  <u>@tvarAmount<.</u></strong></p>
<p> </p>
<p>@op.na< </p>
<p> </p>
<p>This communication is from a debt collection agency.</p>
</body>
</html>
@PDF end
 
 Example 2 - HTML Email With Attachment@no html
@no html wrapper
@tvarDate! = 01/01/1960
@tvarAmount$ = 0.00
@tvarDate2! = 01/01/1960
@tvarAmount2$ = 0.00
@de.tr no total where ( @tr.pa = x ) max = 1
@tvarDate = @tr.pda
@tvarAmount$ = @(tr.tu+tr.di)
@de.tr
@de.con no total where ( @co.ty = Promise ) where ( @co.ip = x ) max = 1
@tvarDate2 = @co.dd
@tvarAmount2$ = @co.am
@de.con
<html>
<body>
<p>  @cd.na< <br />
  @cd.ad< <br />
  @cd.ci<, @cd.st< @cd.zi< <br />
  Phone: @cd.ph< <br />
  Fax: @cd.fa< <br />
</p>
<p>@e</p>
<p> </p>
<p>@de.na< <br />
  Our Client.........: @de.cl< <br />
  Client Acct#.....: @de.ac< <br />
  Our Acct#........: @de.fi< <br />
  Balance............: @de.ow< </p>
<p> </p>
<p> <u>RECEIPT OF PAYMENT</u></p>
<p>@de.co<:</p>
<p>  Thank you for your payment towards the above referenced account. Your payment was <br />
  received on  <strong><u>@tvarDate<10></u></strong> in the amount of <strong>
  <u>@tvarAmount<.</u></strong></p>
<p> </p>
<p>Please find attached a reminder for your next scheduled payment.</p>
<p> </p>
<p>@op.na< </p>
<p> </p>
<p>This communication is from a debt collection agency.</p>
</body>
</html>
@PDF(
<html>
<body>
<p>  @cd.na< <br />
  @cd.ad< <br />
  @cd.ci<, @cd.st< @cd.zi< <br />
  Phone: @cd.ph< <br />
  Fax: @cd.fa< <br />
</p>
<p>@e</p>
<p> </p>
<p>@de.na< <br />
  Our Client.........: @de.cl< <br />
  Client Acct#.....: @de.ac< <br />
  Our Acct#........: @de.fi< <br />
  Balance............: @de.ow< </p>
<p> </p>
<p> <u>PAYMENT REMINDER</u></p>
<p>@de.co<:</p>
<p> Your next scheduled payment is due on <strong><u>@tvarDate2<10></u></strong>
in the amount of <strong> <u>@tvarAmount2<.</u></strong></p>
<p> </p>
<p>Please send a check payable to @cd.na< to the above address.</p>
<p> </p>
<p>@op.na< </p>
<p> </p>
<p>This communication is from a debt collection agency.</p>
</body>
</html>
)
 
 Example 3 - HTML Email With Attachment With List@no html
@no html wrapper
@tvarDate! = 01/01/1960
@tvarAmount$ = 0.00
@de.tr no total where ( @tr.pa = x ) max = 1
@tvarDate = @tr.pda
@tvarAmount$ = @(tr.tu+tr.di)
@de.tr
@tvarArray[][] = @SQL(
select '<tr>','<td>',tr_payment_date,'</td>','<td>',tr_to_agency,'</td>'
      ,'</tr>'
  from de_transaction
  where tr_rowid_debtor = 1
  and tr_account = 1
  and isnull(tr_posted_date,'') = ''
  order by tr_payment_date
)
<html>
<body>
<p>  @cd.na< <br />
  @cd.ad< <br />
  @cd.ci<, @cd.st< @cd.zi< <br />
  Phone: @cd.ph< <br />
  Fax: @cd.fa< <br />
</p>
<p>@e</p>
<p> </p>
<p>@de.na< <br />
  Our Client.........: @de.cl< <br />
  Client Acct#.....: @de.ac< <br />
  Our Acct#........: @de.fi< <br />
  Balance............: @de.ow< </p>
<p> </p>
<p> <u>RECEIPT OF PAYMENT</u></p>
<p>@de.co<:</p>
<p>  Thank you for your payment towards the above referenced account. Your payment was <br />
  received on  <strong><u>@tvarDate<10></u></strong> in the amount of <strong>
  <u>@tvarAmount<.</u></strong></p>
<p> </p>
<p>Please find attached a reminder for your future scheduled payments.</p>
<p> </p>
<p>@op.na< </p>
<p> </p>
<p>This communication is from a debt collection agency.</p>
</body>
</html>
@PDF start
<html>
<body>
<p>  @cd.na< <br />
  @cd.ad< <br />
  @cd.ci<, @cd.st< @cd.zi< <br />
  Phone: @cd.ph< <br />
  Fax: @cd.fa< <br />
</p>
<p>@e</p>
<p> </p>
<p>@de.na< <br />
  Our Client.........: @de.cl< <br />
  Client Acct#.....: @de.ac< <br />
  Our Acct#........: @de.fi< <br />
  Balance............: @de.ow< </p>
<p> </p>
<p> <u>PAYMENT REMINDER</u></p>
<p>@de.co<:</p>
<p> Please see below for your payment schedule.</p>
<p> </p>
<table>
<tr><td>Payment Date</td><td>Payment Amount</td><tr>
@tvarArray
</table>
<p> </p>
<p>@op.na< </p>
<p> </p>
<p>This communication is from a debt collection agency.</p>
</body>
</html>
@PDF end
 
 Printing A Letter AS A Text File And Attaching To An Email  The @TXT command enables you to create a text file using the report writer, then
  attach it to an email.
   Restrictions:
 
    This function only works with the Email destination.The text in the @TXT command must be formatted text output.   Syntax:
   @TXT start{text to convert}
 @TXT end
 Example:
 Dear @cl.co<,
Please find your payment file for yesterday attached.
@tvarDate! = @d-1
@TXT start
@cl.de no total
@de.tr no total where ( @tr.pa = x ) where ( @tr.pda = @tvarDate) where ( @tr.ofcs != x )
"@de.fi","@tr.pda","@tr.tu"
@de.tr
@cl.de
@TXT end
  The text file will be attached to the email, a copy will be placed into the global\letters folder,
  and a link/reference will be placed on the Letter Contact in the Attachment field.
 
 The default file extension is TXT. You can override this by setting the file extension in
         the File Name field on the  Report Options form using another extension (Example: .CSV).  
 Attaching A Static File To An Email  The @FILEATTACH command enables you to attach existing static files to an email.
   Restrictions:
 
    The file must already exist.The must must be accessible locally or on the network by the user
        who is printing the report.   Syntax: @fileattach({path and file name})
   Example 1: Without a path, the file is assumed to be in the Global Letters folder.
 @fileattach(file.pdf)
@fileattach file.pdf
  Example 2: File path with no spaces.
 @fileattach(S:\documents\file.pdf)
@fileattach S:\documents\file.pdf
  Example 3: File path with spaces.
 @fileattach("S:\my documents\file.pdf")
@fileattach "S:\my documents\file.pdf"
 
 | 
Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.
Please click this link to send us your comments: helpinfo@collect.org