Author Topic: How to sign up with a blank email  (Read 4278 times)

rnr1

  • Posts: 11
    • View Profile
How to sign up with a blank email
« on: October 29, 2007, 12:31:15 pm »
The instructions say:

Quote
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.

rnr1

  • Posts: 11
    • View Profile
More information about the problem
« Reply #1 on: October 29, 2007, 10:48:41 pm »
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.

rnr1

  • Posts: 11
    • View Profile
Still can't get this to work. Any help appreciated.
« Reply #2 on: November 03, 2007, 04:02:25 pm »
I still can't get past the problem.  It appears that everything is set up correctly, but it doesn't work.  HELP!

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
How to sign up with a blank email
« Reply #3 on: November 06, 2007, 01:26:12 am »
Greetings,

Instead of this:
Code: [Select]
/home/getandy/public_html/cgi-bin/newsletter_signup.cgi
try this (with the "pipe" prefix)
Code: [Select]
|/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:
Code: [Select]
$http_program = "/usr/bin/wget -O /dev/null " . $listmail_url . "/signup.php";
to this
Code: [Select]
$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
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting