I have recently discovered I have CDONTS installed on my server. I don't know much about how I can use this to my advantage...
My main query is...
Is it possible for me to use CDONTS to email members in my database when they receive a new personal message from other members and email newsletters to them about updates etc?
Any help will be extremely appreciated.
Kindest regards,
Tom.yes.
just do a Google search on CDONTS and you should get some good examples.
note: the emailing newsletters is a bit trickier than the IM's because you can't really schedule an ASP file to run like every once a month or something like that.
The best thing in that case is to make the rollout a part of how you get the newsletter on the web server - be it through an upload or whatever.Hiya Putts, hope your well!
With regards to Newsletters, returning info on google I could not grasp how I could email to more that one email address?
Im also wondering, how it is I could invent a emailing facility along with the ability to receive emails? Im aiming high I know!
Regards,
Tom.You can create a loop loading each member's email address and sending the message, one at a time. (heavy server load if thousands of addresses)
Dim strReturnAddress
Dim strToAddress
Dim strBlindAddress
'create a loop here and move through the recordset
strReturnAddress = "[email protected]"
strToAddress = oRS.fields("member_email")
strBody = "<p><font face='Tahoma' size='2'>"
strBody = strBody & "<p>Put some text here. </p>"
strBody = strBody & "<p>Put some text here</p>"
strBody = strBody & "<p>Put some text here</font></p>"
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = strReturnAddress
objCDOMail.To = strToAddress
objCDOMail.Bcc = strBlindAddress
objCDOMail.Subject = "Message Subject Goes Here"
objCDOMail.BodyFormat = 0
objCDOMail.MailFormat = 0
objCDOMail.Body = strBody
objCDOMail.Importance = 2
objCDOMail.Send
Set objCDOMail = Nothing
' end of loop
The more efficient way would be to loop through emails building a string as you go along (email = email & ";") and then use the string as the BCC. (I would limit the number of addresses in a BCC to maybe 300 and do it again for the next 300)
My main query is...
Is it possible for me to use CDONTS to email members in my database when they receive a new personal message from other members and email newsletters to them about updates etc?
Any help will be extremely appreciated.
Kindest regards,
Tom.yes.
just do a Google search on CDONTS and you should get some good examples.
note: the emailing newsletters is a bit trickier than the IM's because you can't really schedule an ASP file to run like every once a month or something like that.
The best thing in that case is to make the rollout a part of how you get the newsletter on the web server - be it through an upload or whatever.Hiya Putts, hope your well!
With regards to Newsletters, returning info on google I could not grasp how I could email to more that one email address?
Im also wondering, how it is I could invent a emailing facility along with the ability to receive emails? Im aiming high I know!
Regards,
Tom.You can create a loop loading each member's email address and sending the message, one at a time. (heavy server load if thousands of addresses)
Dim strReturnAddress
Dim strToAddress
Dim strBlindAddress
'create a loop here and move through the recordset
strReturnAddress = "[email protected]"
strToAddress = oRS.fields("member_email")
strBody = "<p><font face='Tahoma' size='2'>"
strBody = strBody & "<p>Put some text here. </p>"
strBody = strBody & "<p>Put some text here</p>"
strBody = strBody & "<p>Put some text here</font></p>"
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.From = strReturnAddress
objCDOMail.To = strToAddress
objCDOMail.Bcc = strBlindAddress
objCDOMail.Subject = "Message Subject Goes Here"
objCDOMail.BodyFormat = 0
objCDOMail.MailFormat = 0
objCDOMail.Body = strBody
objCDOMail.Importance = 2
objCDOMail.Send
Set objCDOMail = Nothing
' end of loop
The more efficient way would be to loop through emails building a string as you go along (email = email & ";") and then use the string as the BCC. (I would limit the number of addresses in a BCC to maybe 300 and do it again for the next 300)