Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - posting through email
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

posting through email

 Post Reply Post Reply Page  <123
Author
thekiwi View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 November 2003
Location: New Zealand
Status: Offline
Points: 392
Post Options Post Options   Thanks (0) Thanks(0)   Quote thekiwi Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2004 at 3:45am
Originally posted by dpyers dpyers wrote:

Very cool.

What component did you wind up using? Any chance of posting the code somewhere?


I used JMail for the Script collecting the Emails from a POP box.... although you could use anything.

You ideally need access to your server running WWF as I wrote a Windows script that runs on a schedule every 5 mins.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2004 at 5:57am

Quote
Borg

you have a misconfig for forum postings in your forum.  The above posting appeared via Email as:

Forum: Web Wiz Forums Support
Topic: posting through email
Posted By: -boRg-

Very cool.

What component did you wind up using? Any chance of posting the code somewhere?

You will note it says its from you.


bruce knows about this but there are more pressing issues...

Back to Top
thekiwi View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 November 2003
Location: New Zealand
Status: Offline
Points: 392
Post Options Post Options   Thanks (0) Thanks(0)   Quote thekiwi Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2004 at 4:54pm
Originally posted by psychopath psychopath wrote:

Is this available?

OK Ive installed it at http://webwiz.infobahn.co.nz to see how involved it was for a 7.7a fresh install and it went in flawlesly.

Couple of catches
  • At the moment it only uses JMail, but the Windows Script can easily be written for various components.
  • The Windows Script resides on the WWW Server (ie created a new Scripts folder in the WWF install) and is run by Microsoft Schedular every 5 mins.  Thus you need acecss to the server, or atleast your ISP to setup the schedule.
  • The Script checks a remote POP3 box which has a wildcard for a "domain".  In this case its easier to setup a subdomain (eg forum.domain.com) with an MX record allowing all mail to be collected in the POP3 box.
  • The VBScript above collects all the Emails from the POP3 box and places them in a new table called emailmessages.  It also collects any attachments and saves them to the forum hard drive (renaming them to avoind and duplicate issues)
  • All messages in the above table are then processed by a Stored Procedure (the step above also uses a stored procedure).  This proc checks for messages of a certain status (ie not yet imported to forum), checks the users posting privs (based on Email address) , and then either adds a new topic or adds a new reply to an existing topic.  Thus it is possible to actually start a new thread via Email.  If a message fails any of the security checks, it is deleted and not posted.
  • Once a message is added to the fourm, the processing Proc above then sends out the notifications in exactly the same manner as the Forum ASP does (and does the same checks, eg not sending to the current user).  This allows total interaction via Email, ie reply to a post, and also have the Email post sent out to everyone else.  THis latter step uses a third table called "mailtable", which basically holds Emails being sent from the forum stored procedures and these are sent by a SQL job.
  • The only change to WWF code is in the following WWF pages 
forum_posts.asp

        if isNull(strAuthorIP) then 'CJH Added EMail Icon
        response.write(VbCrLf & "            <img src='forum_images/e-mail_sent.gif' alt='sent via Email' width='18' height='17' border='0'>")
        end if

This will show a little Email Icon for posts delivered by Email
post_message.asp

                strEmailMessage    = strEmailMessage & "<p>" & strTxtEmailEmailToReply & "<br />"               

So that there is a comment in the delivered Emails about clicking reply (this therefore needs the CONST set in your language file)
and

                'Call the function to send the e-mail
                blnEmailSent = SendMail(strEmailMessage, decodeString(strUserName), decod eString(strUserEmail),    strMainForumName, decodeString(intForumID & "." & lngTopicID & "@forum.domain.com"), strEmailSubject, strMailComponent, true)


All in all it seems to work really well.  The attachments are successfully added to the forum posting, as tho' they wer done via the WWW interface.  It also obeys formatting comments, in that if the Email posting is in HTML, then it posts (Email and WWW) via HTML.  If in plain text, then the Email that gets sent out is also plain text.  Saves seeing HTL code headers.

Back to Top
 Post Reply Post Reply Page  <123

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.