Page 1 of 1

customized email signup with radio box

Posted: Fri Aug 30, 2013 8:31 am
by Tea-Dev
I am trying to integrate the email signup in one of the programs I have. I added the code below, but it is not working. Want to add an email to the default email list only if the user checked "Yes" on a radio box.
Can anyone make any suggestions.
thank you.

Code: Select all


	 protected void Page_Init(object sender, EventArgs e)
	 {
		if (_EmailListId == 0)
		{
			_EmailListId = Token.Instance.Store.Settings.DefaultEmailListId;
		}
	 }

.
.
.
.

try
            {
            	string lclEmail = Page.Request.Form["Email"];
	string lclSignup = NewsletterSignup.Text.ToString();

               EmailList LclEmailList = EmailListDataSource.Load(_EmailListId);
	

	if(lclSignup == "Yes" ) {
            		if (LclEmailList.IsMember(lclEmail) == false) { 
			LclEmailList.ProcessSignupRequest(lclEmail);
		}
	}

      }
     catch (System.Data.OleDb.OleDbException exception)
     {
    }
            /////////////////////////////////////////
            
            
            
        }

Re: customized email signup with radio box

Posted: Fri Aug 30, 2013 8:51 am
by Tea-Dev
Not sure of the email options play a role in the problem we have.

The options that are set for this email list :
Signup Rule: Opt-In with with Confirmation
Signup Email: Email List Signup Notification Only

Do we need to reset any of these options to make the program work?

Re: customized email signup with radio box

Posted: Wed Sep 04, 2013 5:34 am
by AbleMods
Tea-Dev wrote:I added the code below, but it is not working
Do you get any sort of error message? Or does the page simply complete as if everything worked ok?

The signup email address should get an email from the Able system confirming they have been signed up. Is that email being received?

Re: customized email signup with radio box

Posted: Wed Sep 18, 2013 11:51 am
by Tea-Dev
no error messages. looks as if it is working...no email generated.
replace with add.members and it seems that the emails are being inserted into email list. No email is being sent though.

Would like to capture the name and address in the email list. is that possible.