Disable subscription: Solution is here

Solutions for other advanced phplisters

welcome email got disabled too

Postby shaynir » 8:33am, Tue 24 Oct, 2006

I followed Jiminy's instructions and was successful in eliminating the subscription emails.

But now also the welcome emails are not coming - and I want them to be sent.

How do I do this?
phpList newbie
Posts: 4
Joined: 5:52pm, Sat 14 Oct, 2006

Re: Disable confirmation email

Postby austinc » 3:10am, Mon 30 Oct, 2006

jiminy wrote:Hello,

Using version 2.10.2 the following is required:

Perform the steps listed in the first post of this thread (by user: bangonthedrum). Ignore the other users comments about the changing the database (it has no effect because the PHP code sets the user's confirmation status explicitly to 0 so setting the DB to default to 1 for this field doesn't do anything).

At this point the user will be confirmed upon subscribing but the confirmation email will still go out. To disable it find the line (also in subscribelib2.php):

if (sendMail($email, getConfig("subscribesubject:$id"), $subscribemessage,system_messageheaders($email),$envelope,1)) {

and replace it (by commenting it out) with:

// if (sendMail($email, getConfig("subscribesubject:$id"), $subscribemessage,system_messageheaders($email),$envelope,1)) {
if (true) {

This should not effect anything else but will stop the confirmation email from being sent.

If someone knows of a problem with doing this please point it out.


I tried the instructions above but for some reason it didn't work, after the email address is submitted, I get a blank page. Anyone have an idea why?
Posts: 5
Joined: 10:49pm, Sun 01 Oct, 2006

Disable Confirmation + Auto Thanks Page + Auto Thanks eMail

Postby rain999 » 5:11am, Thu 17 May, 2007

Has anyone come up with a way to actually:
1. disable the confirmation step,
2. automatically send out the "Thanks for subscribing" eMail, and,
3. send the new subscriber to a custom Thank you page?

Many thanks!
Posts: 11
Joined: 5:42am, Tue 17 Apr, 2007

another solution

Postby hershel » 10:56am, Tue 05 Jun, 2007

In /lists/index.php one could also add a field like this:

Code: Select all
<input type=hidden name="makeconfirmed" value="1">

to fake the way the admin himself can do this.
Posts: 9
Joined: 1:35pm, Thu 15 Jun, 2006

Postby johnap » 3:23am, Thu 14 Jun, 2007

can you help me with you site name ?

PL Geek
Posts: 64
Joined: 11:11am, Tue 09 Jan, 2007

Re: another solution

Postby richm » 2:27am, Fri 20 Jul, 2007

hershel wrote:In /lists/index.php one could also add a field like this:
<input type=hidden name="makeconfirmed" value="1">
to fake the way the admin himself can do this.

That worked really slick. With this, I can decide to do some forms as confirmed and others as not confirmed, and not disable the feature for when we might need it.
Posts: 12
Joined: 3:20pm, Wed 28 Sep, 2005

Postby may3838 » 9:36am, Fri 02 Nov, 2007

Hi, where exactly on the index.php page should I add this line to make it work?

hershel wrote:
In /lists/index.php one could also add a field like this:
to fake the way the admin himself can do this.

"/lists" should be the main directory that I installed phplist right?

Any help would be greatly appreciated.
phpList newbie
Posts: 1
Joined: 9:32am, Fri 02 Nov, 2007


Postby hmesfin1 » 6:50pm, Sat 19 Jan, 2008

Thanks a bunch!

This worked!
Posts: 6
Joined: 7:37pm, Sun 30 Dec, 2007

Re: another solution

Postby emma » 6:07am, Wed 27 Feb, 2008

hershel wrote:&lt;input type=hidden name=makeconfirmed value=1>

I added the above to the subscribe form but that did not work.

PS. I use a custom subscribe form on my homepage instead of:
PL Nut
Posts: 32
Joined: 7:21am, Tue 05 Feb, 2008

Postby emma » 6:16am, Wed 27 Feb, 2008

Code: Select all
&lt;input type=hidden name=makeconfirmed value=1>

I added the above to:

That didn't work too.

Can someone help?
PL Nut
Posts: 32
Joined: 7:21am, Tue 05 Feb, 2008

makeconfirmed = 1

Postby jmatasov » 7:32pm, Wed 12 Mar, 2008

FWIW, the makeconfirmed = 1 code above only works if the user is logged in as an admin. Looking through the subscribelib2.php, I see why. Since I need the option of making use of the makeconfirmed hidden input as described above, and am willing to risk the fact that non-admins (e.g. anyone) will be able to circumvent the confirmation email if they know html, I modified the subscribelib2.php as follows:

At line 284 I inserted the following code:
Code: Select all
} else if ($_POST["makeconfirmed"] && !$blacklisted) {
      $sendrequest = 0;
      Sql_Query(sprintf('update %s set confirmed = 1 where email = "%s"',$GLOBALS["tables"]["user"],$email));
      addUserHistory($email,$history_subject." by Subscribe Page",$history_entry);
sendMail($email, getConfig("confirmationsubject:$id"), getConfig("confirmationmessage:$id"),system_messageheaders($email),$envelope);

right before the "} else {" statement.

Now, I can add the
Code: Select all
<input type="hidden" name="makeconfirmed" value="1" />

statement to those (custom) subscribe pages that I want auto-confirmed with no email being sent. I'm still testing my form, but it *appears* to work correctly. The admin shows the user as confirmed, and (so far) my test users do not receive a confirmation email.

If you do not want the user to receive a thank you email, then you can just omit the of my code posted above starting with "sendEmail". That code is what initiates a send of the "thank you" email.

I just coded that, and it *looks* right, and it works for me, but someone smarter than me should probably go over it to make sure I didn't miss something.

Note that my code in the first box is 6 lines long. In the editor here, it appears to wrap. Not sure if it does when veiwing in the forum. All lines except the first end in a semicolon.
phpList newbie
Posts: 1
Joined: 5:47pm, Wed 12 Mar, 2008

Postby myopenbar » 8:24pm, Wed 02 Jul, 2008

The above post is great but when it sends the thank you email none of the dynamic text is generated. ie: lists subscribed to, pref url, unsubscr url.

any thoughts?
Posts: 11
Joined: 5:37pm, Wed 21 Jun, 2006
Location: New York

Not there

Postby Gordon858 » 1:07am, Fri 01 Aug, 2008

I looked in the subscribelib2.php and the text that is to be modified does not appear anywhere in there. I did a find as well as a visual search, and that string does not exist in that file. Is there anywhere else I might look for that string? The objective is to remove the need for a subscriber to confirm via a link that is sent after subscribing. I want them to be able to subscribe, and then receive a mail welcoming them to our list.

This is the text that this thread says to change from a 0 to a 1.


Any and all suggestions are welcome.
PL Nut
Posts: 25
Joined: 5:20pm, Sat 19 Jul, 2008
Location: Vancouver, Canada

It works!

Postby Gordon858 » 2:45am, Sat 09 Aug, 2008

I followed the suggestion from the very first post here, found the string, made the page changes, and it works perfectly. Thanks for those who offered help, as it was truly appreciated.

Gordon :D
PL Nut
Posts: 25
Joined: 5:20pm, Sat 19 Jul, 2008
Location: Vancouver, Canada

Add user directly to DB

Postby Guest » 10:10pm, Thu 14 Aug, 2008

Searching and Searching and I cannot find the answer to completely bypass the subscribe page.

Everything I read has to do with the email portion. I would like to still have the email go out but I want to remove the extra step of the subscribe page.

I am trying to pass all the value via C# code behind.

This is my first post and retardily I was given a error message that I cannot post a URL. SO hopefully I explained the issue well enough. I am attaching a zip file with a text doc with the URL. Hopefully that will be viewable. I added it but don't see it as attached anywhere.




Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest