Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to email a form without sendmail?

Status
Not open for further replies.

smashing

Programmer
Oct 15, 2002
170
US
I'm trying to get a script to email a parsed form, but my ISP people (they have a Unix server) don't allow sendmail (or even sendmail.pm). They just have a pre-installed script for forms and they let me specify (in the "my preferences" page of their web-hosting plan setup-page), one (!) email address where the form will be sent. Apparently this only works if you use their script. Hope this doesn't sound too stupid, but is there any other way I can get it to email stuff from the form? I’ve seen other folk’s scripts that use ‘mailto’ ‘recipient’ ‘email’ etc, but have no idea how to work those work. PLEASE HELP!!! Thanks.
 
You are going to need one of the several modules that will
do SMTP tricks. Here is a simple way to send an email if
the Mail::Sender module is available.
Code:
#!perl -w
use Mail::Sender;
use strict;

my $mail_text = qq(
============================================================
This is the text of an email message that is sent via the 
Perl Mail::Sender module.  no Mail server or other pop3 client is needed, just the Mail::Sender module.  You will need to shoot a a valid account on a mail server. );

eval {
        (new Mail::Sender)
        ->MailMsg({smtp => "some.mail_server.com",
                from => 'user@some.mail_server.com',
                to =>'another@other_server.com',
                subject => 'this is a test',
                msg => "$mail_text"})
 }
or die "$Mail::Sender::Error\n";

If none of the SMTP modules are available, then you're out
of luck.

I’ve seen other folk’s scripts that use ‘mailto’ ‘recipient’ ‘email’ etc, but have no idea how to work those work.

You can put a anchor in an HTML page that will open the user's mail client, but, I don't think that will do what you want.
Code:
<a href=&quot;mailto:user@some_co.com&quot;>e-mail</a>
'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Thanks GoBoating!
Called up ISP again with your info, was told that anything 'mail' isn't going to work. Only their[COLOR=/] form works 'cause they transfer it to a text file which goes in to a log file & then gets mailed by their server due to security issues. Am having to switch ISP now. Thank you very much and have nice day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top