Author |
Topic |
paoloc
Starting Member
8 Posts |
Posted - 11 May 2001 : 08:19:16
|
quote:
I already wrote about digest in an earlier post:
quote: Interesting feature.
But how shall it be implemented? I run my forum on a Linux server. I could set up a cron job to be executed daily. This cron job could send out the digest email to the "digest subscribers".
Does anyone have an idea of how to make a platform independent solution?
As I said, I don't know how a digest system should be implemented.
I believe you should implement the digest as asp page and let users implement the scheduling system (cron in Unix, service on Windows or a free asp component by NewIntelligence you can find on NewTools Package
Paolo
|
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 11 May 2001 : 09:07:31
|
quote: I believe you should implement the digest as asp page and let users implement the scheduling system (cron in Unix, service on Windows or a free asp component by NewIntelligence you can find on NewTools Package
I would need to supply a program that loops through all "digest subscribers" in the database, compose appropriate emails, and send them. This program must be executed daily (or whatever time period we choose).
Is it possible to execute an ASP file from a scheduling system like cron? If so, I could create the ASP file that loops through the database.
I'm working on a similar system on a web site. It is a Java program called weekly by cron. This Java program creates a newsletter, inserts it in the Snitz database, checks wich users that subscribe to the newsletter (this MOD) and emails them. However, this solution is Java based, not ASP, so it can not be used by people using ASP-only hosts.
|
|
|
paoloc
Starting Member
8 Posts |
Posted - 11 May 2001 : 11:49:32
|
quote:
quote: I believe you should implement the digest as asp page and let users implement the scheduling system (cron in Unix, service on Windows or a free asp component by NewIntelligence you can find on NewTools Package
I would need to supply a program that loops through all "digest subscribers" in the database, compose appropriate emails, and send them. This program must be executed daily (or whatever time period we choose).
Is it possible to execute an ASP file from a scheduling system like cron? If so, I could create the ASP file that loops through the database.
I'm working on a similar system on a web site. It is a Java program called weekly by cron. This Java program creates a newsletter, inserts it in the Snitz database, checks wich users that subscribe to the newsletter (this MOD) and emails them. However, this solution is Java based, not ASP, so it can not be used by people using ASP-only hosts.
http://www.newtelligence.com/
The newtelligence Sleeper is a simple and free of charge component that contains a single API called Sleep. The API is designed for use with Active Server Pages and provides a safe way for a page to sleep without burning CPU cycles as it waits for pending requests from the back-end.
Sleep Waits for a specified period of time.
HRESULT Sleep( int Milliseconds // [in] number of milliseconds to wait ); Parameters Milliseconds
Number of milliseconds to wait. To wait for 1 second, the argument is 1000. Return Standard COM HRESULT identifying the success or failure of the operation. In general, this function should not fail unexpectedly.
QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later.
|
|
|
Martha2Mary
Junior Member
New Zealand
250 Posts |
Posted - 11 May 2001 : 22:25:00
|
quote:
Maybe we should also change the word "Subscribe" at the top of the column to an image? Does anyone have images we can use?
Well, I am not very good at image editing, so someone more experienced could do a better job than I, but I did come up with the following:
To replace the word 'Subscribe':
For Categories/Forums NOT Subscribed to, with alt=Click here to Subscribe:
For Categories/Forums subscribed to, with alt='Click here to Unsubscribe':
That's all I managed to come up with, anyway
*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind * |
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 12 May 2001 : 02:44:12
|
I have found a bug with this, and that is if for example User1 at adomain.com wants to get replies and so does User2 at anotherdomain.com also wants to get replies as well for the same message, your code ends up sending this;
<user1@adomain.com;user2@anotherdomain.com>
and of course sends it to anotherdomain.com. Does anyone have any idea how to fix this up?
Regards,
Webmaster @ Classic Motor Cycling Classic Motor Cycling
Edited by - Classicmotorcycling on 12 May 2001 02:45:38 |
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 12 May 2001 : 05:02:33
|
quote: I have found a bug with this, and that is if for example User1 at adomain.com wants to get replies and so does User2 at anotherdomain.com also wants to get replies as well for the same message, your code ends up sending this;
<user1@adomain.com;user2@anotherdomain.com>
and of course sends it to anotherdomain.com. Does anyone have any idea how to fix this up?
My mod makes creates a string with all recipients, strRecipients. This string is used in inc_mail.asp for distributing the email. I use ChiliMail, which demands a string like "user1@adomain.com;user2@anotherdomain.com". Obviously your mail component doesn't like this string. I suppose I will have to create different strRecipients for different mail components? Which do you use?
|
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 12 May 2001 : 08:45:52
|
Anders M,
I am using the JMail for sending from the forums on a Windows 2000 server. My mail server is a sendmail server on FreeBSD, if that helps. (I have set this to only accept to send mail from my servers as well). I can change to CDONTS if that works. But thought that I might as well bring it up.
quote:
quote: I have found a bug with this, and that is if for example User1 at adomain.com wants to get replies and so does User2 at anotherdomain.com also wants to get replies as well for the same message, your code ends up sending this;
<user1@adomain.com;user2@anotherdomain.com>
and of course sends it to anotherdomain.com. Does anyone have any idea how to fix this up?
My mod makes creates a string with all recipients, strRecipients. This string is used in inc_mail.asp for distributing the email. I use ChiliMail, which demands a string like "user1@adomain.com;user2@anotherdomain.com". Obviously your mail component doesn't like this string. I suppose I will have to create different strRecipients for different mail components? Which do you use?
Regards,
Webmaster @ Classic Motor Cycling Classic Motor Cycling |
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 12 May 2001 : 13:48:16
|
quote: I am using the JMail for sending from the forums on a Windows 2000 server.
I found a JMail FAQ. According to the FAQ, we must use another strategy for adding several recipients than with ChiliMail. The way to do it with JMail is like this:
JMail.AddRecipient "user1@adomain.com" JMail.AddRecipient "user2@anotherdomain.com" The way to do it with ChiliMail is like this:
ChiliMail.To = "user1@adomain.com;user2@anotherdomain.com" This means that I will have to re-deign the code. In the meantime, you can solve the problem by setting No of addresses per email to 1. This will work with all email components.
|
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 12 May 2001 : 18:34:47
|
Anders M,
Thanks for the info with JMail, it also helped with another project I am working on. I have now set it to the one e-mail. Looking forward to version 5 as well.
quote:
quote: I am using the JMail for sending from the forums on a Windows 2000 server.
I found a JMail FAQ. According to the FAQ, we must use another strategy for adding several recipients than with ChiliMail. The way to do it with JMail is like this:
JMail.AddRecipient "user1@adomain.com" JMail.AddRecipient "user2@anotherdomain.com" The way to do it with ChiliMail is like this:
ChiliMail.To = "user1@adomain.com;user2@anotherdomain.com" This means that I will have to re-deign the code. In the meantime, you can solve the problem by setting No of addresses per email to 1. This will work with all email components.
Regards,
Webmaster @ Classic Motor Cycling Classic Motor Cycling |
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 13 May 2001 : 15:06:28
|
quote: This means that I will have to re-deign the code. In the meantime, you can solve the problem by setting No of addresses per email to 1. This will work with all email components.
I figured out that there is no need for re-design. You can split the string strRecipients in inc_mail.asp like this:
Set objNewMail = Server.CreateObject("Jmail.smtpmail") objNewMail.ServerAddress = strMailServer arrayStr = Split(strRecipients, ";", -1, vbTextCompare) For Each emailStr in arrayStr objNewMail.AddRecipient emailStr Next objNewMail.Sender = strSender objNewMail.Subject = strSubject objNewMail.body = strMessage
In this way, we will call objNewMail.AddRecipient several times with just one email address at a time.
|
|
|
john-boy
Starting Member
United Kingdom
19 Posts |
Posted - 14 May 2001 : 06:42:39
|
quote:
Version 4 now available: http://www.paddla.space2u.com/subscription_mod_4.zip
BRIEF DESCRIPTION
It is possible to subscribe on: * Topic * Forum * Category * "Everything"
When you check a checkbox, you subscribe to the corresponding forum, topic etc. To unsubscribe, simply uncheck the checkbox. When someone replies to a topic or posts a new topic, the subscribers get an email which contains the text and an URL to the topic.
The admin interface makes it possible to switch subscription on/off on different forums, categories etc. The admin interface also makes it possible to configure how many email adresses that shall be put on the "to" of each email. For example, for emailing 1000 members, we can send 10 email, each containing 100 email adresses in the "to" of the email.
NEWS COMPARED TO MOD VERSION 3
1) Subscription on category. 2) Subscription on "everything". 3) Admin interface makes it possible to switch subscription on/off for every forum, category etc.
Regards,
-Anders M
Hi, When I try to access this mod at the quoted URL, I am getting a network password box. Has the URL changed? Also, I have a heavily modified version of the current release, is your modified code well documented? Ps. Thanks for doing this Mod, I have been waiting for this one for some time.
JB
Edited by - john-boy on 14 May 2001 06:46:55 |
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 14 May 2001 : 07:12:36
|
quote: When I try to access this mod at the quoted URL, I am getting a network password box. Has the URL changed?
Sorry. Now the URL works again. I'm in the process of changing domain to www.paddla.nu but www.paddla.space2u.com will also work. So now you can download the mod from www.paddla.space2u.com/subscription_mod_4.zip" target="_blank">http://www.paddla.space2u.com/subscription_mod_4.zip
quote: Also, I have a heavily modified version of the current release, is your modified code well documented?
Yes, I have clearly marked which sections in the code that are added. I have also marked which sections in the code that are modified. NOTE: Some users have had problems modifying default.asp since their file was very different from the original one (Snitz Forums 2000 v3.1 SR4). Please get back here if you have problems, and I'll see if I can help you.
Edited by - Anders M on 14 May 2001 07:17:09 |
|
|
MazY
Starting Member
United Kingdom
13 Posts |
Posted - 17 May 2001 : 16:27:44
|
Firstly - let me say - great work. A very (if not the most) valuable mod for my own particular forum theme.
Two things that I would deperately like to see in it however:
1. Make the option to include the actual message within the email configurable (Yes/No). I personally don't want the recipient to just read the answer in the email but rather would have it as a "sticky" aspect of them returning to the forum via a link to the reply contained within the forum itself, at which time they may well post another.
2. A standard footer at the end of each mail saying "This mail has been sent for information purposes only. Please do not reply to this email address." (or something along those lines. I just have a vision of people just hitting reply (especially as the text of the reply is contained within the email.) Not something that I really want to have to deal with.
Now a questions: Forgive my ignorance or my laziness if this has been answered elsewhere but the option "No of addresses per email" - what does that actually configure?
Again, excellent work and very very useful. (more so if I can remove the message from the mail itself though).
Edited by - MazY on 17 May 2001 16:31:37 |
|
|
ahimanikya
Starting Member
22 Posts |
Posted - 17 May 2001 : 17:07:09
|
I have seen in HowR Forum one Mod which allow you to customize the mail format you send, is it possible to do that for this MOD
Thanks Ahimanikya
|
|
|
Anders M
Junior Member
Sweden
117 Posts |
Posted - 17 May 2001 : 18:57:20
|
MazY and ahimanikya, if you want to change the mail format yourself, look for the following code in post_info.asp
function SendSubscribeEmail(topicId, topicName, forumId, forumName, catId, postedByName, url, isReply) if not emailAddrBuilt then BuildEmailAddr topicId, forumId, catId emailAddrBuilt = True end if strSql = "SELECT S_NO_OF_EMAILADDR FROM " & strTablePrefix & "SUBSCR_CONFIG" set rsSubscrConf = my_Conn.Execute (strSql) noOfEmailAddr = rsSubscrConf("S_NO_OF_EMAILADDR") rsSubscrConf.close set rsSubscrConf = nothing strSubject = "[" & forumName & "] " if isReply then strSubject = strSubject & "RE: " end if strSubject = strSubject & topicName strMessage = "Posting in " & strForumTitle & vbCrLf strMessage = strMessage & "Written by: " & postedByName & vbCrLf strMessage = strMessage & url & vbCrLf & vbCrLf & txtMessage & vbCrLf strRecipients = "" counter = 0 For i = 1 To maxNoOfMembers
The blue code is where the subject of the mail is created, strSubject. It contains the forum name (forumName) and the title of the topic (topicName).
The green code is where the body of the mail is created, strMessage. The variable strForumTitle is the name of your web site. The variable url is the URL to the topic. The variable txtMessage contains the written message. The variable postedByName is the name of the author.
Just replace the blue and the green code to suit your needs.
-Anders M
|
|
|
Topic |
|