Results 1 to 2 of 2

Thread: Using sockets for sending mail

  1. #1
    Registered
    Join Date
    Feb 2009
    Location
    EU
    Posts
    2
    Rep Power
    0

    Using sockets for sending mail

    I just migrated to PW from a dedicated server and I have a simple script which gets an user input from a form on a web page and sends this input to me by email. This script uses sockets:

    Code:
        # Make the socket filehandle
        
        if (!socket(SMTP, $AF_INET, $SOCK_STREAM, $protocol)) {
            $Error_Message = "Could not make socket filehandle ($!).";
            return(1);
        }
        
        # Give the socket an address
        
        bind(SMTP, $local_socket_address);
        
        # Connect to the server
        
        if (!(connect(SMTP, $server_socket_address))) {
            $Error_Message = "Could not connect to server ($!).";
            return(1);
        }

    When I try to execute that script I get the following error message:

    550 authsmtp08: Host 65.254.224.36: No unauthenticated relaying permitted

    Is it possible to use such a type of script at PW and if so - how this script must be changed?

    If this script cannot be used, is there an example of how to use "sendmail" for this purpose?

  2. #2
    Registered
    Join Date
    Feb 2009
    Location
    EU
    Posts
    2
    Rep Power
    0
    I found out in the "Knowledge base" about formmail.pl, so I will use it. This thread can be closed, I think.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •