User Profile

Collapse

Profile Sidebar

Collapse
davidiwharper
davidiwharper
Last Activity: Mar 15 '09, 10:30 AM
Joined: Mar 13 '07
Location: Sydney, Australia
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • CDO: Accessing message in Exchange Public Folder

    Hello all

    I am trying to modify a CDO script that moves email messages out of a user's inbox and into a drop folder. I want to update it to use a Public Folder instead.

    The portion of the original script that matters is:

    Code:
    ' URL used for Outlook Web Access
    strOWAURL = "http://servername/exchange/"
    
    ' Login
    
    Set objUserSess = CreateObject("MAPI.Session")
    ...
    See more | Go to post

  • davidiwharper
    replied to Perl as a cron job: permissions error
    in Perl
    Great idea guys!

    It turns out that the server's ~/logs directory has some screwy permissions that can't be played with. Problem solved!

    Thanks for that!
    See more | Go to post

    Leave a comment:


  • davidiwharper
    started a topic Perl as a cron job: permissions error
    in Perl

    Perl as a cron job: permissions error

    Hello everyone,

    I am running a database maintenance script to remove old entries from a log file.

    The script runs as expected when initiated manually:

    Code:
    ./maintain.pl $HOME/website/database/ $HOME/logs/
    However, when it is run as a cron job, the err.log file I have set up for errors generates an error:

    Code:
    Cannot open lock file!
    I assume...
    See more | Go to post

  • Thank you SO much KevinADC, that was exactly the problem!
    See more | Go to post

    Leave a comment:


  • davidiwharper
    started a topic "Content-type" etc displaying in browser
    in Perl

    "Content-type" etc displaying in browser

    Hello everyone,

    I'm learning Perl again!

    I am writing a CGI script that has two possible outcomes. So I have broken up the HTML output into four parts:

    Beginning (header and the start of the HTML)

    Option 1 OR
    Option 2

    Ending (remainder of the HTML)

    This works fine as a program, the different options display according to the input. However, at the top...
    See more | Go to post

  • davidiwharper
    replied to Email Perl Script Issue
    in Perl
    I did something vaguely similar [doing conditional things in the script based off a web form's checkbox] last year for a study project. While I didn't do emails based off of it the basic idea is the same. YMMV.

    Code:
    # define the email addresses in Perl so they are safer from prying eyes
    
    $my email1Destination = 'example1@domain.com';
    $my email2Destination = 'example2@domain.com';
    $my email3Destination
    ...
    See more | Go to post

    Leave a comment:


  • davidiwharper
    replied to Web form: Frustrating problem
    in Perl
    $formcontents is blank:



    There is literally no content, specifically no undef message. Just before the code you quoted, I defined $formcontents as "".

    Thank you for your continued help with this.

    David...
    See more | Go to post
    Last edited by davidiwharper; Apr 6 '07, 03:58 AM. Reason: more claring

    Leave a comment:


  • davidiwharper
    replied to Web form: Frustrating problem
    in Perl
    Sorry about the delay in posting -- exams.

    Great idea, but this didn't work. Thanks for the suggestion, any more? (hoping against hope here)

    If you're ever in Australia look me up and I'll buy you a beer, heh... you deserve it, mate :-)
    See more | Go to post

    Leave a comment:


  • davidiwharper
    replied to Web form: Frustrating problem
    in Perl
    The problem is almost certainly in the changes I quoted at the beginning, V1 has none of these issues.

    But for the life of me I am stuck, and my teacher is as well. Looks like the script needs to be scrapped and I will have to do without the server-side error checks.

    Thanks.
    David
    See more | Go to post

    Leave a comment:


  • Hi there,

    You need to chomp each input to remove the line break character entered into the script when the user presses the return/enter key after typing in each variable, just like you do later on.

    Code:
    chomp ($first= <STDIN>);
    chomp ($last = <STDIN>);
    Also, it is useful to use tab characters to visually show which bits of your code are in a function or loop (are they the...
    See more | Go to post

    Leave a comment:


  • davidiwharper
    replied to Web form: Frustrating problem
    in Perl
    On the form:

    Code:
    <form method="post" onsubmit="return checkform()" action="/cgi-bin/activate_v2.pl" >
    
    <input type="hidden" id="ip" value="127.0.0.1" />
    
    <p><table>
    <tr>
    	<td>Full Name:</td>
    	<td><input type="text" id="fullname" size="31" /></td>
    ...
    See more | Go to post

    Leave a comment:


  • davidiwharper
    replied to Web form: Frustrating problem
    in Perl
    Indeed, unfortunately all of them are true. The problem is I don't know why.
    See more | Go to post

    Leave a comment:


  • davidiwharper
    replied to Web form: Frustrating problem
    in Perl
    I should mention the actual problem I guess: I always get the error page, not the success page. When I've tried printing the variables (ip, fullname etc) collected at the beginning of the script to the screen (the HTML page), they display as blank.
    See more | Go to post

    Leave a comment:


  • davidiwharper
    started a topic Web form: Frustrating problem
    in Perl

    Web form: Frustrating problem

    Hi everyone,

    I'm writing a web form and a backend Perl script to send a query to the administrator.

    V1 of the script is working well, it's basically just a simple get-data-send-email [sendmail] script. V2, on the other hand, is a nightmare. I added just a few changes.

    In the HTML page (which has become an SHTML page to support a server includes:

    Code:
    <form method="post" onsubmit="return
    ...
    See more | Go to post

  • davidiwharper
    replied to Extracting parameters from an HTML page
    in Perl
    True, and thanks. Can I have edit rights to my original post, please?

    Thanks again!
    David
    See more | Go to post

    Leave a comment:


  • davidiwharper
    replied to How to Send Email
    in Perl
    I'm a beginner too, but this is the code I've been taught -- for use with a UNIX/Linux environment:

    Code:
    #!/usr/bin/perl
    #
    # Email program - sends message to administrator
    #
    
    my $sendmail = '/usr/sbin/sendmail'; # this is different on some systems, use "whereis sendmail" to find the exact location
    my $destination = 'admin@somewhere.com.au';
    my $sender = 'admin@somewhere-else.com.au';
    ...
    See more | Go to post

    Leave a comment:


  • davidiwharper
    started a topic Extracting parameters from an HTML page
    in Perl

    Extracting parameters from an HTML page

    Hi everyone,

    I am rewriting a basic "email data to administrator" script to include an error check, which will ensure that all fields are filled with at least some data.

    However, there is a problem (almost certainly a coding error on my part). I divided the script into subroutines to make it easier to understand and my logic seems to have stuffed up somewhere.

    The code looks like this: Code Attached...
    See more | Go to post
    Last edited by miller; Mar 23 '07, 08:11 AM. Reason: Code Attached

  • davidiwharper
    replied to Calling Javascript in Firefox
    That worked like a charm.

    Thanks!! :-)...
    See more | Go to post

    Leave a comment:


  • davidiwharper
    replied to Calling Javascript in Firefox
    Hi there,

    Thanks for the response.

    I've stripped out all of the foreign HTML (there is a lot of PostNuke formatting), and also the reference to external script in the header.

    The page now looks like this:

    Code:
    <head>
    <title>User Information Request</title>
    <meta name="Generator" content="EditPlus" />
    <meta name="Author"
    ...
    See more | Go to post

    Leave a comment:


  • davidiwharper
    started a topic Calling Javascript in Firefox

    Calling Javascript in Firefox

    Hi there.

    I'm putting together a page to collect some information from our website users and send the administrator an email. To this end I have some Javascript form validation in an external file, activation.js. I have put a script tag in the header, and everything works fine in Internet Explorer 7 and Opera 9.

    However, the script is not being called in Firefox 2. I can tell that the script is not being called because...
    See more | Go to post
No activity results to display
Show More
Working...