• Resolved ajbeaven

    (@ajbeaven)


    I’ve set up a scheduled task to run a vbscript file every 15 minutes to get postie to post automatically. The script just makes a simple HTTP GET request to /wp-content/plugins/postie/get_mail.php as described here: https://stackoverflow.com/questions/204759/http-get-in-vbs.

    Here’s what the script looks like:

    Call CheckMail()
    
    Sub CheckMail()
    
            On Error Resume Next
    
            Dim getRequest
            Dim URL
    
            Set getRequest = CreateObject("MSXML2.XMLHTTP")
            URL = "https://www.mydomainhere.com/blog/wp-content/plugins/postie/get_mail.php"
    
            getRequest.open "GET", URL , false
            getRequest.Send
    
            Set getRequest = Nothing
    
    End Sub

    I have plenty other scheduled tasks like this set up to run tasks and they work as they should. Is there any reason why this wouldn’t work with postie?

    Cheers,
    Andrew

    https://www.ads-software.com/extend/plugins/postie/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ajbeaven

    (@ajbeaven)

    Ahh, when I wrote the response to a text file this is what I get:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""https://www.w3.org/TR/html4/strict.dtd">
    <HTML><HEAD><TITLE>Not Found</TITLE>
    <META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
    <BODY><h2>Not Found</h2>
    <hr><p>HTTP Error 404. The requested resource is not found.</p>
    </BODY></HTML>

    I know for sure that the URL is correct. When I copy and paste the URL from the script into my browser it resolves and postie checks for mail as it should.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Not sure what to tell you. Something about your request is wrong, or there some server side activity happening.

    Take a look at:
    https://blogs.iis.net/tomkmvp/archive/2009/04/27/troubleshooting-a-404.aspx

    Thread Starter ajbeaven

    (@ajbeaven)

    Sigh… turns out I forgot I had my hosts file set up. Thanks for the response anyway. Great plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Posting automatically using vbscript’ is closed to new replies.