Hi Justin,
Thanks so much for your detailed expiation!
I am using the Mac OS X, and I don't think that it comes with a SMTP mail 
server like you describe in windows.
I do see the mails in the CF admin/undelivered mail. I thought that it would be 
a nice way to test to see if everything is working before I upload it tot the 
server.

Yes the other host(I switched to hostek) told me that if I wanted the scheduled 
task to run automatically I would have to set up cron jobs. They gave me 
examples of how to set up cron jobs for the e-mails in the database, but not 
how to set up a url. This is why I switched hosting, as now I can use the 
cfschedule tag with no problems.

Thanks for the advice of using the wildcard "*" I did not now that would affect 
performance.

I like you idea about checking to see if the e-mail is valid. When the user 
signs up, I check to see if it is a real email, but people do sign up with bad 
e-mails, like [email protected] or something like that, so it passes the test 
that it is a real e-mail, but some of the them are not real e-mails, and get 
bounced back. I will be looking into you idea about checking to see if it is a 
real e-mail in the cfloop

Would I do something like this? I don't know if I need to set "email" as a 
variable. Also, since the application gets all the e-mails from the database 
and sends a message, I assume that the files email_address is being used.

thanks so much, below is the code
John


<cfset tipdate = #CreateODBCDate(now())#>


<!---record_id, tipdate, dailytip, consumer_link, research_link--->
<cfquery name="rs_dailytip" datasource="#REQUEST.dataSource#">
SELECT email_address
FROM dailytips 
WHERE tipdate = #tipdate#
</cfquery>

<!--- Get users & their email from the users table--->
<cfquery name="GetMembers" datasource="#REQUEST.dataSource#">
  SELECT email_address
  FROM email_alerts
</cfquery>


<cfloop query="GetMembers">
  <cfif isValid("email", GetUsers.email_address)>
  <cfmail To="#GetMembers.email_address#"
    From="[email protected]"
    Subject="Got Nutrients? Daily Tip"
    type="HTML">

    
        <em>#DateFormat(tipdate, "mmmm d, yyyy")#</em><br />
#rs_dailytip.dailytip#<br />

        <br>
    Consumer Related Article:<br />
                  <cfoutput><a href="#rs_dailytip.consumer_link#"> 
#rs_dailytip.consumer_text#</a></cfoutput>
                  <br /> 
                  Research Related Article:<br />
            <cfoutput><a href="#rs_dailytip.research_link#"> 
#rs_dailytip.research_text#</a></cfoutput>
   </cfif>
  </cfmail>
</cfloop>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5791
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to