Devicode Technology Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Give a warning message before my ebook codes are used up.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Devicode Technology Forum Index -> Response Mailer
View previous topic :: View next topic  
Author Message
Mike
Guest





PostPosted: Wed Jan 18, 2006 11:36 am    Post subject: Give a warning message before my ebook codes are used up. Reply with quote

I use your autoresponder to send a unique userid and password for ebooks that I sell. Is it possible your software to give a warning when the ebook codes it is dispensing gets down to a specific number?
Back to top
devicode
Site Admin


Joined: 05 Mar 2005
Posts: 248

PostPosted: Wed Jan 18, 2006 11:58 am    Post subject: Reply with quote

Yes.
You can create a vbscript that will check the file size and when it is less then a certain amount it will send an email to you.

Your computer will not be able to directly send an email. You would need to either
1. Install IIS SMTP Service
2. Use a program that allows you to send an email from the command line. (You will also have to modify the script below to use the email utillity)

Here is a script that you can modify to suite your needs.

  1. Create a text file, LowCodes.vbs with the following text.

    Code:
    'Send an email if the product key file has just a few entries
    Dim nFileSize
    Dim oFS
    Dim f
    nFileSize = 0
    Set oFS = CreateObject("Scripting.FileSystemObject")
    If oFS.FileExists("C:\Program Files\ResponseMailer 3\sample-productkeys.txt") Then
       Set f = oFS.GetFile("C:\Program Files\ResponseMailer 3\sample-productkeys.txt")
       nFileSize = f.Size
    End If   
       
    If nFileSize < 1000 Then
       ' Send the email
       Dim oMessage
       Set oMessage = CreateObject("CDO.Message")
       oMessage.To = "you@somewhere.com"
       oMessage.From = "you@somewhere.com"
       oMessage.Subject = "Warning : Low registration codes"
       oMessage.TextBody = "The registration codes file has just a few entries left." & vbCrLf & _
          "The file size is " & nFileSize & " Bytes."
       oMessage.Send
       Set oMessage = Nothing 
    End If

    You will need to modify the script to look at the correct text file that stores your userid and password.

  2. To get Response Mailer autoreply to run the script

    1. Edit the Responder and click the Actions tab
    2. Add a 'Run a program' Action
    3. Select the LowCodes.vbs you created
    4. Click Ok

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Devicode Technology Forum Index -> Response Mailer All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group