Could someone recommend simple and convenient CGI-mailer script? It function is send web statistic logs by email, and it will work with JavaScript which will take all statistic about web site visitors. To adjust JavaScript, I need know CGI-mailer parameters.
you will have to send your javascript thur the url to the script. If you need something much simpler check the cgi forums here there is a mail script discussion
Some amplification: the JavaScript is website visitors logger, it collects the visitors data and then should pass data to cgi-mailer. All this automatically, visitors should not type/fill any forms. CGI-mailer script task is just mail data to my email. Web host on which will be set CGI-mailer, supports the net::smtp. The JavaScript will be placed on another web host, not on the same host with CGI-mailer. What CGI-mailer I can use and how to configure cgi-mailer and JavaScript itself? I am not familiar with Perl.
you need to write your perl script that will send the message.
Next you will have to write a javascript that takes the infomation. Create a url encoded message and sends it to the script that then parses and send the info.
to = escape(to);
from = escape(from);
subject = escape(subject);
msg = escape(msg);
myurl = url + 'to='+to+'&from='+from+"&subject="+subject+"&msg="+msg;
//heres the part that Im not to sure about
location.url = url; //this will redirect the page so you would have to open a popup with the above url then close it
{
an additional note if you are collecting env data ie the plaform, os, browser that type of stuff it can be done much easier with perl.
It there a way to adjust that formmail script that it send mail each time when the javascript code referred to this perl script? Formmail script need send email when Javascript code reffers to that script from html document.
Here is part of javascript code that reffers to cgi script:
you can't just refer to a cgi you have to send a request. When you send a request the browser exspects a answer and the server sends a response for that expectation. What you are trying to do is create a work around for what browsers were designed to do. It can be done but it isn't going to as easy as just "referring" to the script. Which is why I said open a popup to recieve the response then close the popup. Negative aspects are that if popups are blocked things will not work as you have planned.
And Like I said before any information that you can get with javascript you can get with perl then email it from the same script.
But I want use that javascript not only on html page, but also in html email; the javascript can be inserted directly in email body, but the cgi-script - not, its only server side script.
I would like use that javascript also in html emails. What cgi script I should use to interface this javascript with? (the piece of javascript code has shown in top)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.