Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 25th, 2004, 03:01 AM
Authorized User
 
Join Date: Aug 2004
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mass Emaling in ASP

Hi,
I have 1000's registred user and i would like to contact them with personal email( like ... Dear xyz) ,

Is there any way in asp to use mass emailing.

i got one software in .Net aspNetEmail but it's not for simple asp.

Please ans me if you have any idea.

~Thanks
 
Old August 25th, 2004, 09:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

Quote:
quote:Is there any way in asp to use mass emailing.
Yep, tons!
How you want to do it depends on which email object/component you want to use.
CDONT is a build in object in ASP that let you send email by IIS SMTP.
What it all come down to is loops. You got your email body and just loop through your names in the db and insert them appropriately and use some kind of method like:
Code:
objEmail.To = strEmailAddress 'this variable is from the db as well
objEmail.Send
That's really it. Your ISP probably got some kind of third-party email component installed that you can use, even simpler than CDONT.

 - mega
 
Old August 25th, 2004, 11:41 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Hi Mega,

Thank you for info, Can you give me a link / more informaiton about the sample code, etc.,



 
Old August 26th, 2004, 09:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have used this one located at http://www.4guysfromrolla.com/webtech/012400-1.shtml
But let me warn you it times out on me after about 500 emails so you may need to do some testing first.
 
Old August 26th, 2004, 11:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

Quote:
quote:
Code:
   While Not objRec.EOF
        'create a new cdo object
        Set objCDOMail = Server.CreateObject("CDONTS.NewMail") '?!??!??
        'set its properties
        objCDOMail.From = strFrom
        objCDOMail.To = objRec("EMail")
        objCDOMail.Subject = strSubject
        objCDOMail.Body = strBody
        'send the mail
        objCDOMail.Send
        'set the object = nothing
        Set objCDOMail = Nothing
        'confirm to the user that the mail has been sent
        Response.Write "Message sent to " & objRec("EMail") & "!<br>"
        'go to the next record
        objRec.MoveNext
    WEND
    'notify the user that the broadcast has completed
    Response.Write("<h1>Broadcast Comlete</h1>")
%>
Why the f*** does he create the object every time he got a record?!?

Don't create an object in a loop, but outside.

 - mega
 
Old August 26th, 2004, 12:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry to have angered you so much, seesh. I was just trying to point them to something that I came across that could maybe help or at least give them a good starting point.
 
Old August 26th, 2004, 01:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

I'm not mad, just got a tendency to use strong words. Try creating the object outside the loop and see what happens, if you mail more than 500 mails.

 - mega
 
Old September 3rd, 2004, 05:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Very odd to see 4guysfromrolla website having such code on their site.

_________________________
- Vijay G
Strive for Perfection
 
Old September 4th, 2004, 06:39 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Well, given the fact that the article was written 4 1/2 years ago, I think we should give them some credit ;)

I am sure that back then the author(s) didn't know what they know now, and I don't think it's an easy task reviewing / updating the massive amount of articles on 4Guys....


Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old September 4th, 2004, 01:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yes, you are right Imar. I always have high regards for 4guys..., having done a marvellous job so far. But still these are very rare and bound to happen. We can always let them know of such things when noticed, than being harsh on that. Reviewing is something more of expectation. Can't really think of that for the amount of work they have done.

Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
send MASS Emails in ASP.NET 2 with VB.NET 2005 alexdcosta ASP.NET 2.0 Basics 1 July 17th, 2006 12:31 AM
Mass Mailing in ASP.NET ghari ASP.NET 1.0 and 1.1 Professional 0 February 8th, 2006 02:04 AM
Mass Import DTS Packages ritag SQL Server DTS 2 September 16th, 2003 02:40 PM
Mass Update vincentvdm Classic ASP Databases 1 July 20th, 2003 12:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.