iEntry 10th Anniversary Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > Classic ASP

Reply
 
LinkBack Thread Tools
Old August 12th, 2006, 01:11 PM   #1
New Member
 

Join Date: Jul 2006
Location: Philippines
Age: 29
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 chlad is on a distinguished road
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.
chlad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 16th, 2006, 10:34 AM   #2
New Member
 

Join Date: Aug 2006
Location: Birmingham, UK
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 elopus is on a distinguished road
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:
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
elopus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 28th, 2006, 12:54 AM   #3
New Member
 

Join Date: Jul 2006
Location: Philippines
Age: 29
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 chlad is on a distinguished road
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.
chlad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 16th, 2006, 01:05 AM   #4
New Member
 

Join Date: Nov 2006
Location: India
Age: 36
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 nothingwrongtotryme is on a distinguished road
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.
nothingwrongtotryme is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
sending , mail , body , message , database


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Your Design and Layout 4 December 23rd, 2007 11:16 AM
Need help sending HTML message in PHP. annawilsonz PHP 0 September 14th, 2007 03:31 AM
Sending Form to E-mail student_in_training JavaScript 2 August 16th, 2006 09:41 AM
Sending File without open E-mail Application accessman Databases 0 September 26th, 2005 12:51 PM
sending an e-mail by ASP benbacardi Classic ASP 5 September 1st, 2004 04:33 PM


Search Engine Optimization by vBSEO 3.2.0 RC8