Community & Support

Making simplenews subscribe WITHOUT confirmation

Hi all,
I have a simplenews install which is working fine. But I would like to take away the "confirmation email" that gets posted out. I am hoping that if they subscribe, then they are automatically added to the newsletter and the old "CONFIRMATION email" is now a "WELCOME email" only.

Our reasoning is that sometimes people subscribe, but then fail to click the "confirm subscription" link.
cheers
Dan

Comments

Hello All,

I too am having a similar problem. I'm a Drupal Newbie, so any help would be greatly appreciated!

On my website, a user may subscribe to any of a long list newsletters. Using the simplenews module, it appears that if the user subscribes to say 5 newsletters, then they receive 5 separate confirmation messages, which I'm afraid might be annoying for the user. I would like to modify the module so that either:
(a) it sends a single confirmation message, even if the user subscribes to multiple newsletters. -- or --
(b) it requires no user confirmation at all.

If someone could give me a pointer on how to do this, I'd really appreciate it.
I've looked at the simplenews.module code and see that it could probably be hacked up, but I suspect there's a more elegant approach, and I would hate to use a hacksaw when a tweezer will do. In particular, I'm afraid that if I start making major changes to the module, it will be difficult to maintain when new versions are released.

Thanks,
Mindy

P.S. I am running version 5.1

I support these requests

Hi,
I was looking for a solution to the problem above described - in an english better than mine I guess ;-)
So, I truly support these requests. I would like not to have the confirmation email (or have the possibility to choose) but when somebody subscribes to the newsletter he/she should receive a welcome newsletter.

A quick hack to remove confirmation emails

I just figured this out and wanted to pass along the easy fix:

I read the code and the $confirm flag for the function simplenews_subscribe_user() defaults to true. By simply setting a FALSE default flag, the function will subscribe the user without sending him a confirmation email. I tested it, and looked at the code. It's actually going straight to full subscription without the confirmation step (thank you forward thinking developers) I would like to see this as an added feature in future versions, it should be very easy on a newletter by newsletter or site wide basis. Anyway here are the changes you need to make... note : they will be for ALL newsletters.

This is for simplenews.module,v 1.48.2.3 2007/02/20 17:14:28
If you want just the subscriptions to not be confirmed...change to the following

line 636 - function simplenews_subscribe_user($mail, $tid, $confirm = FALSE) {

line 864 - drupal_set_message(t('Your subscriptions have been updated.'));

If you want just the "un"-subscriptions to not be confirmed as well... change to the following

line 670 - function simplenews_unsubscribe_user($mail, $tid, $confirm = FALSE) {

line 872 - drupal_set_message(t('Your subscriptions have been updated.'));

also, "www.yoursite.com/newsletter/subscriptions" gives all the availible newletters and is availible to anonymous users! took me days to figure this out (I have over 100 newsletters and this was just driving me nuts) cheers

Frank Carey

solution

Thank you!!!
Mindy

enabling newsletter/subscriptions for anonymous

newsletter/subscriptions is only visible to users with the 'subscribe to newsletters' permission enabled. So enable this for anonymous users at admin/user/permissions if you plan on them using it.

SimpleNews

I have try to resolve this problem but the solution is not found in admin panel then i add the code

// OR add user to newsletter relationship if not already subscribed.
    db_query("INSERT INTO {simplenews_snid_tid} (snid, tid) VALUES (%d, %d)", $subscription->snid, $tid);

    // Execute simplenews subscribe trigger.
    simplenews_call_actions('subscribe', $subscription);

into

if($confirm){
// block
}

BLOCK.

Atul Gupta
wedigtechnologies.com

Insufficient for later versions

For SimpleNews 6.x-1.0 beta, this line:

// If e-mail belongs to the current registered user, don't send confirmation.
$confirm = $account->uid && $account->uid == $user->uid ? FALSE : TRUE;

Determines the confirmation behavior.

I just hacked mine to read: $confirm = false; // $account->uid && $account->uid == $user->uid ? FALSE : TRUE;

Andre'

André Angelantoni
Founder, PostPeakLiving.com

Thanks for the comment. Just

Thanks for the comment. Just what i needed. But removing the confirmation mail poses a new issue. I would like some sort of response to the user when he (un) subscribes. "Thank you for subscribing"... or better, the corresponding text from the admin interface on "Body text of subscribe email". How is that possible?

Thanks
/Thomas

subscribing

subscribing

This worked for me

This worked for me, thanks.
I would definitely recommend an option to choose whatever there it should be a confirmation email or not, or better on-site confirmation.
Also there is a problem with confirmation message, is sent in English although I have the site using both default and current language to French, somehow it ignores my current language.

+1

+1

Per André Rønsen | Front | Twitter: @perandre

Well, this is not

Well, this is not complicated.

A way to do that is to let $confirm with the TRUE value, but just to force the writing of the subscribtion in the database that is controlled by a condition (either mail but no writhing in the database or writing in the database). This is how it is coded for now.

For the coding, I just put as comment the
elseif (!isset($subscription->tids[$tid])) {
line 1001 of my version, in the same function (for the other version, it should be like thirty line after the replacement proposed above.
and of course the } that closes the elseif (1009).

A better coding (this coding removes the condition) would be more changing the elseif into a simple if (didn't test that option).

Then you can personnalise your confirmation message removing the token that links to the confirmation form.

Hi all, Anyone know how to do

Hi all,

Anyone know how to do this on Simplenews version 2 beta?

Thanks, Joe

Would also like to know

Would also like to know

Subscribing, I would also

Subscribing, I would also like to know.

Yep. Looking to remove the

Yep. Looking to remove the confirmation process OR complete the process just from the email click.

Also, listening here: http://drupal.org/node/410964

Thanks for posting the link

Thanks for posting the link on the last post - With the single opt in now in Simplenews there is no confirmation message sent.

Just going to work out how to send a welcome email now.

cheers, Joe

nobody click here