Link to home
Start Free TrialLog in
Avatar of holger
holgerFlag for Germany

asked on

CGI script combimail.exe" for IIS servers


Hello,

a programer of a website I have on my IIS
server needs a cgi program to send email forms.

This scripts is "combimail.exe" and can be found for
default at apache web servers.

Is this script available for IIS, too?

Thanks

Holger Hussy




Avatar of Peewee
Peewee

holger,
there are many thing to use here, have you had a look at MIME::Lite, u can choose a mail program like sendmail or blat or use smtp setting - its very flexible - the example here is in perl code:

$msg = MIME::Lite->new(
                        From     =>'me@myhost.com',
                        To       =>'you@yourhost.com',
                        Cc       =>'some@other.com, some@more.com',
                        Subject  =>'Helloooooo, nurse!',
                        Data     =>"How's it goin', eh?"
                        );



 $msg = MIME::Lite->new(
                        To      =>'you@yourhost.com',
                        Subject =>'HTML with in-line images!',
                        Type    =>'multipart/related'
                        );
           $msg->attach(Type => 'text/html',
                        Data => qq{ <body>
                                    Here's <i>my</i> image:
                                    <img src="cid:myimage.gif">
                                    </body> }
                        );
           $msg->attach(Type => 'image/gif',
                        Id   => 'myimage.gif',
                        Path => '/path/to/somefile.gif',
                        );
           $msg->send();

Change how messages are sent
 
           ### Do something like this in your 'main':
           if ($I_DONT_HAVE_SENDMAIL) {
              MIME::Lite->send('smtp', "smtp.myisp.net", Timeout=>60);
           }
 
           ### Now this will do the right thing:
           $msg->send;         ### will now use Net::SMTP as shown above



regards
Peewee
holger,


blat is a windows command line email tool you can call from the command line or from examples like MIME::Lite.

http://www.freedownloadscenter.com/Email_Tools/Command_Line_Mail_Tools/Blat.html


regards Peewee
Or you can use the CDONTS functions from Microsoft:

formmail.asp


    <SCRIPT LANGUAGE=VBScript RUNAT=Server>
        Dim myCDONTSMail
        Dim strFrom
        Dim strTo
        Dim strSubject
        Dim strMessage
        Dim strBody
        Dim lngImportance
       
        Set myCDONTSMail = CreateObject("CDONTS.NewMail")
        myCDONTSMail.From = request.form("email")
        myCDONTSMail.To=request.form("recipient")
        myCDONTSMail.Subject = request.form("subject")
     myCDONTSMail.BodyFormat = cdoBodyFormatHTML
        for each item in request.form
             strBody = strBody & item & "=" &   
                Request.form(item) & vbCrLf
        next
        myCDONTSMail.Body = strBody
        myCDONTSMail.Send

        Set myCDONTSMail  = Nothing
        response.redirect(request.form("redirect"))
    </SCRIPT>
This example sends a small message:

    #!/usr/local/bin/perl -w


    use Net::SMTP;

    $smtp = Net::SMTP->new('mailhost');

    $smtp->mail('senders name');
    $smtp->to('heelo@world.com');

    $smtp->data();
    $smtp->datasend("To: hello@world.com\n");
    $smtp->datasend("\n");
    $smtp->datasend("A simple test message\n");
    $smtp->dataend();

    $smtp->quit;




SUPPORTED PLATFORMS
Linux
Solaris
Windows



NAME
Net::SMTP - Simple Mail Transfer Protocol Client




METHODS
Unless otherwise stated all methods return either a true or false value, with true meaning that the operation was a success. When a method states that it returns a value, failure will be returned as undef or an empty list.

banner ()

Returns the banner message which the server replied with when the initial connection was made.

domain ()

Returns the domain that the remote SMTP server identified itself as during connection.

hello ( DOMAIN )

Tell the remote server the mail domain which you are in using the EHLO command (or HELO if EHLO fails). Since this method is invoked automatically when the Net::SMTP object is constructed the user should normally not have to call it manually.

etrn ( DOMAIN )

Request a queue run for the DOMAIN given.

mail ( ADDRESS [, OPTIONS] )

send ( ADDRESS )

send_or_mail ( ADDRESS )

send_and_mail ( ADDRESS )

Send the appropriate command to the server MAIL, SEND, SOML or SAML. ADDRESS is the address of the sender. This initiates the sending of a message. The method recipient should be called for each address that the message is to be sent to.
The mail method can some additional ESMTP OPTIONS which is passed in hash like fashion, using key and value pairs. Possible options are:

 Size        => <bytes>
 Return      => <???>
 Bits        => "7" | "8"
 Transaction => <ADDRESS>
 Envelope    => <ENVID>

reset ()

Reset the status of the server. This may be called after a message has been initiated, but before any data has been sent, to cancel the sending of the message.

recipient ( ADDRESS [, ADDRESS [ ...]] [, OPTIONS ] )

Notify the server that the current message should be sent to all of the addresses given. Each address is sent as a separate command to the server. Should the sending of any address result in a failure then the process is aborted and a false value is returned. It is up to the user to call reset if they so desire.
The recipient method can some additional OPTIONS which is passed in hash like fashion, using key and value pairs. Possible options are:

 Notify    =>
 SkipBad   => ignore bad addresses
If SkipBad is true the recipient will not return an error when a bad address is encountered and it will return an array of addresses that did succeed.


to ( ADDRESS [, ADDRESS [...]] )

A synonym for recipient.

data ( [ DATA ] )

Initiate the sending of the data from the current message.
DATA may be a reference to a list or a list. If specified the contents of DATA and a termination string ".\r\n" is sent to the server. And the result will be true if the data was accepted.

If DATA is not specified then the result will indicate that the server wishes the data to be sent. The data must then be sent using the datasend and dataend methods described in the Net::Cmd manpage.


expand ( ADDRESS )

Request the server to expand the given address Returns an array which contains the text read from the server.

verify ( ADDRESS )

Verify that ADDRESS is a legitimate mailing address.

help ( [ $subject ] )

Request help text from the server. Returns the text or undef upon failure

quit ()

Send the QUIT command to the remote SMTP server and close the socket connection.



--------------------------------------------------------------------------------
picked right out of the documentation.
holger,

I doesn't seems to be able to find combimail.exe on my Apache installation.  Is this a standard apache supplied package?

btw.  The previous responses are very (very good).  I hardly seen many experts contributed with a top quality responses.  

cheers.
holger,

did u get the answer u were looking for?

regards Peewee
ASKER CERTIFIED SOLUTION
Avatar of Peewee
Peewee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial