• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

perl script for web form => POP mail w/ authentication?

IronWing

No Lifer
My web host changed the rules on their mail server to require authentication for outgoing mail. I have a perl script that reads user entered form data from a webpage and emails it to my mailbox. However, it has no provision for user authentication. Anyone know of any simple perl scripts to accomplish this? I'm willing to look at scripts in other languages but perl is my strong suit.

With the current script the user enters their name, email address, a subject line, and a message. The script scrubs the input to remove any potential scripts or other unpleasantness and puts it in a formatted email message to my mailbox.
 
Thanks. I figured out that the default version of perl on my webhost, 5.6, doesn't support authentication but that 5.8 is also available so I was able to redirect my script to that version of perl. I figured out that the script hangs before it even gets to the auth step. The connection to the mail server never gets made. I'm using the same settings for the smtp server as I use in Thunderbird so I'm still scratching my head as to why the server is rejecting the connection.

Code:
my $smtp = Net::SMTP->new('smtp.myhost.net',
    Hello => 'smtp.myhost.net',
    Port => 25, 
    Debug => 1) || die "Can't open the gosh dern mail connection: $!";
I tried setting the Hello argument to both the webhost domain and my domain name with similar results. The port number is what Thunderbird uses so that shouldn't be an issue.
 
Back
Top