Sending Mail, Body message from database

This is a discussion on "Sending Mail, Body message from database" within the Classic ASP section. This forum, and the thread "Sending Mail, Body message from database are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 12th, 2006, 16:11
New Member
Join Date: Jul 2006
Location: Philippines
Age: 28
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Sending Mail, Body message from database

hi everyone!

i have to send a mail using asp wherein in Body part some of the data will be retrieved from the database.
how will i retrieved all records for example it has 5 records per person?

do i have to put the ff:

Mail.Body = do while not rs.eof...
Mail.Body = Mail.Body & .....

Mail.Send



----------------

please help.

thanks.
Reply With Quote

  #2 (permalink)  
Old Aug 16th, 2006, 13:34
New Member
Join Date: Aug 2006
Location: Birmingham, UK
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Sending Mail, Body message from database

If you've got 5 records for person, I'd think you'd need one loop for each person, then a further loop inside that for each record. For example, in pseudocode:

Code: Select all
while not Users.EOF
    Mail.To = Users("email")
    Mail.Body = "Message start..."
 
    while not Users_Records.EOF
        Mail.Body += "Record " + Users_Records("Record_Details")
    end while
 
    Mail.Send
end while
Make any sense?

Regards,
-Mark
View my web development blog
Reply With Quote
  #3 (permalink)  
Old Aug 28th, 2006, 03:54
New Member
Join Date: Jul 2006
Location: Philippines
Age: 28
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Sending Mail, Body message from database

hi elopus!

i tried but it didn't work.

i can generate data and show it in a page in a table format. but my problem is in sending via email wherein it will loop on the entire recordset.

any other idea on how can i make this?

thanks a lot. i appreciate your help.
Reply With Quote
  #4 (permalink)  
Old Nov 16th, 2006, 04:05
New Member
Join Date: Nov 2006
Location: India
Age: 35
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Sending Mail, Body message from database

why do you write the do while stuff in the message body ??? create a record set with the filters u require, and then only dump the recordset field in the body value thats it. It works like a charm.
Reply With Quote
Reply

Tags
sending, mail, body, message, database

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Form Data to E-mail Address Fools Gold Starting Out 4 Dec 23rd, 2007 14:16
Need help sending HTML message in PHP. annawilsonz PHP Forum 0 Sep 14th, 2007 06:31
Sending Form to E-mail student_in_training JavaScript Forum 2 Aug 16th, 2006 12:41
Sending File without open E-mail Application accessman Databases 0 Sep 26th, 2005 15:51
sending an e-mail by ASP benbacardi Classic ASP 5 Sep 1st, 2004 19:33


All times are GMT. The time now is 16:01.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43