Posted by matt@antinomia on September 16, 2005 at 7:53pm
Jump to:
| Project: | Mass Mailer |
| Version: | 4.6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
It is apparently not possible for anonymous users to sign up to a massmailer list. I would love to see a situation where site visitors can sign up for lists without 'logging in' or 'creating an account' which is objectionable to many. Also, when somebody subscribes to a list a contact record should be created in CiviCRM. Thanks!
Comments
#1
Also, it should be noted that the volunteer module has similar functionality. Anonymous users can register as volunteers and create a contact record in CiviCRM.
#2
I have found a way for guest users to signup. It is probably not ideal but it seems to work
What I did was I created a block and a php page.
Block:
title = Subscribe to Newsletter
Set Page specific visibility settings to "Show on every page except the listed pages." and add my php page to the textarea list.
Replace the form action with path to you php page.
Replace hidden field edit[lib] value with your list id that you want guests to subscribe to.
Sorry for the odd coding on the first line but I get an error (Terminated request because of suspicious input data.) when I put
bracket form bracketusing the code filter. I think its a bug.< f o r m action="node/?" method="get"><div class="form-item">
<label for="guest-subscribers">Email address:</label>
<input type="text" name="edit[subscribers]" id="guest-subscribers" class="form-text" />
</div>
<input type="hidden" name="edit[lid]" value="?" />
<input type="submit" class="form-submit" name="op" value="Subscribe" />
</form>
PHP Page.
<?php
/*
required format for edit array
subscribers = email address
lib = List ID
$edit[subscribers] = 'email@test.com';
$edit[lid] = 4;
*/
$edit = $_GET['edit'];
massmailer_add_subscribers($edit);
?>
#3
have someone else try the code up here?
#4
I can confirm that the code suggested here works just fine. I used it to implement a subscribeurl given to anonymous users.
#5
Works for me too, and as a nice side benefit it also adds the email to CiviCRM.
#6
Cleaning...