Archive: how to send user registration information to a website or through email?


how to send user registration information to a website or through email?
Hi,
I wrote a simple installer that ask user to fill out information in a custom page. Is there any way to send the user information back to me through email or a website?

Thanks!

Function RegistrationPage
!insertmacro MUI_HEADER_TEXT "Software" "Registration Form"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "registration.ini"

; read user input
!insertmacro MUI_INSTALLOPTIONS_READ $NAME "registration.ini" "Field 2" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $COMPANY "registration.ini" "Field 4" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $ADDRESS "registration.ini" "Field 6" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $EMAIL "registration.ini" "Field 8" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $PHONE "registration.ini" "Field 10" "State"

; write user inputs to file
WriteINIStr "$EXEDIR\userinfo.ini" "Product" "Name" "NetWorkSpaces Pro"
WriteINIStr "$EXEDIR\userinfo.ini" "Product" "Version" ${VERSION}
WriteINIStr "$EXEDIR\userinfo.ini" "User Contact" Name $NAME
WriteINIStr "$EXEDIR\userinfo.ini" "User Contact" Company $COMPANY
WriteINIStr "$EXEDIR\userinfo.ini" "User Contact" Address $ADDRESS
WriteINIStr "$EXEDIR\userinfo.ini" "User Contact" Email $EMAIL
WriteINIStr "$EXEDIR\userinfo.ini" "User Contact" Phone $PHONE
FunctionEnd


You could write a PHP or CGI script and use InetLoad to send the data as POST or GET data.

-Stu


Hi,
I wrote a simple cgi script that looks like this,
#!/usr/bin/perl
use CGI
$q = new CGI;
$name = $q->param('name')
$mailto = "name\@domain.com";
open(MAIL, "|/usr/lib/sendmail -oi -n -t");
print MAIL <<END;
To:$mailto
From:$mailto
Subject: test

Name=$name
END
close(MAIL);


This script works as standalone and I was able to receive the message that I send throug a HTML form. However, when I tried to invoke the script from installer, it failed

Here is what I include in RegisterPage function mentioned in the previous message,

InetLoad::load /post "name=abc" "http://test.domain.com/cgi-bin/test.cgi"
Pop $0 # return value = exit code, "OK" if OK
MessageBox MB_OK "Post Status: $0"


Am I using InetLoad's post in a wrong way?

Thanks!


got it working.
I have to specify a post reply page, like this,

InetLoad::load /post "name=abc" "http://test.domain.com/cgi-bin/test.cgi" "$EXEDIR\post_reply.html"
Pop $0 # return value = exit code, "OK" if OK
MessageBox MB_OK "Post Status: $0"