p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Re: loop , send mail, schedule task


Message #1 by "Draco Associates Ltd" <jmail@d...> on Thu, 1 Mar 2001 09:07:42 -0500
Thanks, but I figured it out :)

--- Draco Associates Ltd <jmail@d...>
wrote:
> DW, I don't know the answers to your questions.  As
> I reported, I was
> getting a timeout using ASPMail after it sent only a
> few hundred
> messages.  On the advice of my ISP and a couple of
> others, I changed
> the code to use CDONTS - which I sent you - and now
> send nearly 1,600
> without a hitch.
> 
> My site is hosted on a shared server where I don't
> control or know
> about the setup.  However to state the obvious it
> would seem that
> timeouts on your server are less generous than those
> on the one I'm
> using.  Whether this is an issue with Exchange or
> IIS...?  If IIS, you
> probably know it's easy to change - my ISP lets me
> do that directly -
> but mine is at the 20-minute default timeout and it
> works for me.
> 
> Sorry I can't push you over the top!
> 
> Best,
> 
> Mark
> 
> 
> ----- Original Message -----
> From: "dont worry" <aspmailbox@y...>
> To: "Code Clinic" <proasp_codeclinic@p...>
> Sent: Tuesday, February 27, 2001 1:53 PM
> Subject: Re: loop , send mail, schedule task
> 
> 
> > Also,
> > Aspemail gives me a 'Mail.Host' option which I can
> > assign up to 3 servers to send the mail.  How does
> CDO
> > know where to send the email to if it is not
> assigned
> > in the code?
> >
> > Thank you,
> > dw
> >
> > --- Draco Associates Ltd
> <jmail@d...>
> > wrote:
> > > DW, I had trouble doing this too, also using the
> > > ASPMail component.
> > > In my case, I got a timeout message.
> > >
> > > The solution recommended by a few people was to
> use
> > > NT's native CDO
> > > instead.  Ten minutes of code adjustments, and
> > > voila!
> > >
> > > Set objMailer 
> > > Server.CreateObject("CDONTS.NewMail")
> > > With objMailer
> > > .From = strYourEmailAddress
> > > .To = strRecipientEmailAddress
> > > .Subject = strSubject
> > > If (you want HTML mail) Then
> > > .BodyFormat = 0 ' CdoBodyFormatHTML
> > > .MailFormat = 0 ' CdoMailFormatMime
> > > .Body = strBodyText
> > > Else ' want plain text mail
> > > .BodyFormat = 1 ' CdoBodyFormatText
> > > .MailFormat = 1 ' CdoMailFormatText
> > > .Body = strBodyText
> > > End If
> > > .Send
> > > End With
> > > Set objMailer = Nothing
> > >
> > > IMPORTANT NOTES
> > >
> > > 1. You *do* have to create and destroy the
> object
> > > for each message.
> > > Despite that, it's faster than ASPMail and (for
> me)
> > > it works.
> > >
> > > 2. strBodyText must include all your HTML code
> if
> > > you're sending HTML
> > > mail.  If memory serves, ASPMail will insert a
> > > couple of basic HTML
> > > tags for you, but CDO won't.
> > >
> > > Hope this helps.
> 

  Return to Index