ListMailPRO Email Marketing Software Forums
ListMailPRO Email Marketing Software Forums => Customization, Integration => Topic started by: rnr1 on October 29, 2007, 12:31:15 pm
-
The instructions say:
These scripts are simply pointed to by the email addresses you configure
How do you get an email address or alias to point to a script.
I looked in cPanel, but didn't see anything relevant to that.
Thanks.
Rich
P.S. Since I have over 50 lists, I wrote a simple Perl script that makes any desired number of copies of the example signup-listx.php script (replacing List = x for each one) and naming the script accordingly.
It's really quite simple, but if there are any non-programmers out there who have lots of lists and don't want to manually edit the script each time, I can make it available. It's only 57 lines of code.
-
I found instructions for setting up forwarders in cPanel, so I did this:
All email sent to newsletter_signup@getandytoindy.com will now be
redirected to /home/getandy/public_html/cgi-bin/newsletter_signup.cgi
For the above, I rename signup_list1.cgi to newsletter_signup.cgi.
So, when a blank email is sent to newsletter_signup@getandytoindy.com,
the cgi script is supposed to be executed.
In turn, that script is supposed to parse the incoming email and feed parameters to signup.php. However, I know that that isn't happening,
at least that signup.php is NOT being executed because I added the
following code at the beginning of signup.php:
$email = "rnr@doctorduplicator.com";
$subject = "Signup.php is running on getandytoindy.com.";
$contents = "Rich, signup.php is working!\n\n";
$to = "rnr@doctorduplicator.com";
$from_header = "From:" . $email;
//send mail
mail($to, $subject, $contents, $from_header);
That code would send me an email if it executed.
Moreover, within newsletter_signup.cgi, I tried BOTH
$http_program = "/usr/bin/wget -O /dev/null " . $listmail_url . "/signup.php";
and
$http_program = "/usr/local/bin/wget -O /dev/null " . $listmail_url . "/signup.php";
And I have permissions set to 755 for newsletter_signup.cgi.
-
I still can't get past the problem. It appears that everything is set up correctly, but it doesn't work. HELP!
-
Greetings,
Instead of this:
/home/getandy/public_html/cgi-bin/newsletter_signup.cgi
try this (with the "pipe" prefix)
|/home/getandy/public_html/cgi-bin/newsletter_signup.cgi
Also make sure newsletter_signup.cgi contains the correct ListMail URL and is "chmod" to 755 to be executable.
If it still doesn't work, in newsletter_signup.cgi you might try an alternative to "wget" used by the CGI script(s). Change this:
$http_program = "/usr/bin/wget -O /dev/null " . $listmail_url . "/signup.php";
to this
$http_program = "curl -o /dev/null " . $listmail_url . "/signup.php";
If that still doesn't work we may need to ask your host if they would put a copy of the "wget" utility in your home folder.
Regards