NPscripts.com

adding a new variable to messages.

adding a new variable to messages.

Posted: Tue Jul 06, 2010 3:08 am

by Vitality

heyy, currently when you send a message out you can use: <NAME> or <UNSUBSCRIBE_LINK>im trying to add one with <GAMERTAG>. i understand where the code is at in the subscriber.cgi i just dont know how to write it :/

if im right.. they are where# PLAIN TEXT SENDis located

and yes, i have an input on my form which records the "gamertag" of the user.

if someone could help me with the code that'd be great

Re: adding a new variable to messages.

Posted: Tue Jul 06, 2010 4:33 pm

by Admin-BS

All you need to do is go to the admin.cgi script and go under "Add Slots." Then you can add any number of additional fields which can be inserted into outgoing messages.

Re: adding a new variable to messages.

Posted: Wed Jul 07, 2010 9:45 am

by Vitality

thanks! that worked.

and also im trying to send a "thank you" message to the user that subscribes when they subscribe. it worked when i had e-mail confirmation enabled and i had the code in activate.cgi... but since e-mail confirmation is disabled, i now have the code in subscriber.cgi near the bottom of sub addmail.here is what i have:

# Now count total... If >= to notify number, email the administrator...open(NOTIFY,"$list/.notify");while(<NOTIFY>) {$count++;}close(NOTIFY);

# Send a Thank you for Subscribing to the Newsletter$from = "$admin";$to = "$newmail";$subject = "Thank you for subscribing to the ________ Newsletter!";&mail;

print MAIL "Hey, thanks for subscribing to the ________ Newsletter!\nVisit the link below to _________\n\nhttp://test.com";

close(MAIL);

if ($count >= $notify) {

# EMAIL THE ADMINISTRATOR HERE

but i dont receive an e-mail after subscribing. is something wrong with the: $newmail that i've used?

Re: adding a new variable to messages.

Posted: Fri Jul 09, 2010 6:54 pm

by Admin-BS

Sorry for the slow reply...

The code looks fine to me. I'm not sure what could be causing it. You may want to open up the file "common" in the root directory and find the "mail" subroutine. Assuming you're using sendmail, look for the following lines:

You may wish to uncomment the first line, and comment the second. This should create that TESTMAILFILE.txt file with the contents of what otherwise would be sent to sendmail. This might give a clue to the problem if something looks off.