We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

mailing list unsubscription url?

Development and Programming

fogcity's avatar
fogcity
260 posts
about 17 years ago
fogcity's avatar fogcity

ive got a php routine to send a notification to everyone in an EE mailing list whenever a new entry is posted to my blog.

works fine, BUT i would like to include unsubscription info at the bottom of these notifications.

problem is, since the emails are being generated from a php extension, i dont have access to the mailing list tag {unsubscribe_url}

how do i work around this? i imagine there’s a routine i can access?

Moved by Moderator to Extensions: Technical Assistance

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
about 17 years ago
Robin Sowell's avatar Robin Sowell

I may shift this to ‘extensions’ as it’s a third party script- and I don’t know how it works. Sending mail via the standard communicate approach, you’d just tweak the templates and use the unsubscribe_url variable- as you note. But no telling how the extension handles it.

Which extension is it?

       
fogcity's avatar
fogcity
260 posts
about 17 years ago
fogcity's avatar fogcity

thanks for the reply, robin.

the extension i’ve modified is called Snitch. originally written (not by me) to extend the Notification system, I’ve added code that will further extend it by adding a specified mailing list to the recipients.

here’s the snippets of code in question:

if ( ! class_exists('EEmail'))
            {
                require PATH_CORE.'core.email'.EXT;
            }
            
            $email = new EEmail;

and then later:

$query = $DB->query("SELECT email FROM exp_mailing_list WHERE list_id = '".$list_id."' ORDER BY email asc");
                    if ($query->num_rows > 0)
                    {
                          foreach($query->result as $row)
                          {
                            $addy = $row['email'];
                            $email->initialize();
                            $email->wordwrap = false;
                            $email->from($PREFS->ini('webmaster_email'), $PREFS->ini('webmaster_name'));    
                            $email->to($addy);
                            $email->reply_to($PREFS->ini('webmaster_email'));
                            $email->subject($email_tit);    
                            $email->message($REGX->entities_to_ascii($email_msg));
                            $email->Send();
                        }
                    }

how best to change this to use Communicate module as you suggest?

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
about 17 years ago
Sue Crocker's avatar Sue Crocker

fogcity, I’m going to move this to the Extensions forum. Helping troubleshooting custom extensions is normally beyond the scope of technical support.

You might want to work with the original author to add additional functionality to the extension.

       
fogcity's avatar
fogcity
260 posts
about 17 years ago
fogcity's avatar fogcity

The core of my question is tech support oriented, even if the context is not. I will post a more specific question.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.