Sending Data in an Email

Results 1 to 2 of 2

Thread: Sending Data in an Email

  1. #1
    Join Date
    Dec 1969

    Default Sending Data in an Email

    I am using ASPMail to send emails. I want to send some records from access database in the body of this email. How do i go about it? any idea ?

  2. #2
    Join Date
    Dec 1969

    Default Not 100% sure whether I understand you...

    ...but can&#039;t you just compile the body of the e-mail by querying the database for the relevant records. Something likes this (it&#039;s only pseudo-code):<BR><BR>Dim Body<BR><BR>Body = "The following are the records sent to you by e-mail: " & vbNewLine & vbNewLine<BR><BR>Open Database<BR>Run Query<BR><BR>For Each Record in QueryResults<BR>&nbsp;&nbsp;&nbsp;Body = Body & "Name: " & Record("Name") & vbNewLine<BR>&nbsp;&nbsp;&nbsp;Body = Body & "Address: " & Record("Address") & vbNewLine<BR>&nbsp;&nbsp;&nbsp;Body = Body & vbNewLine<BR>Next<BR><BR>Close Database<BR><BR>Send E-mail using Body<BR><BR><BR>Hope this helps,<BR>Oliver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts