We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26931
    • 2,314 Posts
    You actually have to apply a filter in the management interface before sending your newsletter (just filter on the name of the newsletter that they signed up for).
    ahh, okay...thanks, it’s working smiley didn’t know i had to go to "View Items" first and add a filter to the list. i guess this is also the way to send a test-nesletter (filter by a certain email address)
      • 19090
      • 35 Posts
      Hi
      I was just wondering if it’s possible to send embedded images in the newsletters generated with this Add-on.
      Best Regards
      Vlad
        • 26931
        • 2,314 Posts
        anonymized-26931 Reply #143, 17 years ago
        Hi Vlad,

        I was just wondering if it’s possible to send embedded images in the newsletters generated with this Add-on.
        sure, the path to the images just needs to be absolute. You can change the settings under "Tools" -> "Configuration" -> "Interface & Features" -> "Rewrite browser paths?" -> set to "No"
        ...anyone has an idea, if it would be possible to have these settings (absolute image paths) just for the newsletter-folder?!

        j
          • 9130
          • 171 Posts
          This is what I do, all my newsletter images are part of the newsletter template so I added the full path to the template itself.

          Embedding the images in the mail is something a little different, it means actually sending the images as attachments and somehow referencing them in the html. Personally I have no idea how to make that work and its currently not supported in TXNewsletters.
            • 5430
            • 247 Posts
            Getting a series of "MySQL server has gone away" errors when trying to send out a large mailing (7500 subscribers). Are there any modifications to the module script I can make to solve this or will I have to have my host make mySQL server changes? Any help would be greatly appreciated.
              • 20853
              • 14 Posts
              Quote from: wavetraxx at Aug 04, 2009, 09:25 AM

              Hi,

              i have installed Modx CMS in a new directory called /v1/

              Thats a problem for the txnewsletter.

              Example 1:
              Newsletter preview -> I can’t see the preview. TXNewsletter take the newsletter from http://www.mysite.com/index.php?id=4
              But that is not the right directory. The right directory is: http://www.mysite.com/v1/index.php?id=4

              Example 2:
              unsubcribe E-mail: http://www.mysite.com/index.php?&id=1&action=del&[email protected]&control=bad200ba893f9d9ef9324b5bcd34cacf
              That dosen’t work. Only with the directory /v1/ does work.

              How i can make its work?
              I had exactly the same problem and I’ve worked out a solution....
              Here’s a diff file for my changes
              Compare: (<)C:\tools\xampp\htdocs\modx100\assets\modules\txnewsletters\txnewsletters.inc.php (86477 bytes)
                 with: (>)C:\tools\xampp\htdocs\modx100\assets\modules\txnewsletters\txnewsletters.inc - Original.php (86444 bytes)
              
              104c104
              <       $link = $modx->config['base_url'].'index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'&action=del&email='.$email.'&control='.$MD5.'';
              ---
              >       $link = 'http://'.$_SERVER['HTTP_HOST'].'/index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'&action=del&email='.$email.'&control='.$MD5.'';
              121c121
              <     $base_path = $modx->config['base_url'];
              ---
              >     $base_path = $modx->config['base_path'];
              531c531
              <     $html .='<form method="post" action="'.$modx->config['base_url'].'index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'" >'."\n";
              ---
              >     $html .='<form method="post" action="http://'.$_SERVER['HTTP_HOST'].'/index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'" >'."\n";
              943c943
              <     $html .='<form method="post" action="'.$modx->config['base_url'].'index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'" >'."\n";
              ---
              >     $html .='<form method="post" action="http://'.$_SERVER['HTTP_HOST'].'/index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'" >'."\n";
              958c958
              <       $html .='<form method="post" action="'.$modx->config['base_url'].'index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'">'."\n";
              ---
              >       $html .='<form method="post" action="http://'.$_SERVER['HTTP_HOST'].'/index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'">'."\n";
              1464c1464
              <   $html .= '  <a href="#" onClick="javascript:window.open(\''.$modx->config['base_url'].'index.php?id=\'+document.formSend.newsletterId.value,\'Newsletter\',\'width=800,height=600,menubar=no,scrollbars=no,status=no,toolbar=no\');"><img src="'.$modx->TXNewsletters['path_url'].'images/context_view.gif" style="vertical-align:middle;" /> '.$modx->TXNewsletters['txtlang']['send_label_preview'].' </a> <br /><br />'."\n";
              ---
              >   $html .= '  <a href="#" onClick="javascript:window.open(\'/index.php?id=\'+document.formSend.newsletterId.value,\'Newsletter\',\'width=800,height=600,menubar=no,scrollbars=no,status=no,toolbar=no\');"><img src="'.$modx->TXNewsletters['path_url'].'images/context_view.gif" style="vertical-align:middle;" /> '.$modx->TXNewsletters['txtlang']['send_label_preview'].' </a> <br /><br />'."\n";
              1524c1524
              <       $link = 'http://'.$_SERVER['HTTP_HOST'].$modx->config['base_url'].'index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'&action=del&email='.$email.'&control='.$MD5;
              ---
              >       $link = 'http://'.$_SERVER['HTTP_HOST'].'/index.php?&id='.$modx->TXNewsletters['idPageUnsubscribe'].'&action=del&email='.$email.'&control='.$MD5;
              


              I’ve tested all the key functionality and it works.
              This is a brilliant MODx addon!
                • 26931
                • 2,314 Posts
                hey Nacnud,

                I had exactly the same problem and I’ve worked out a solution....
                that’s great - thanks for sharing!
                  • 19309
                  • 49 Posts
                  Quote from: etal at Aug 09, 2009, 03:06 AM

                  Here is a version of TXNewsletters with the added option of sending emails with a confirmation link before a subscription is activated.

                  Thanks a lot for adding the confirmation funktion. Since double opt-in is required here in Germany due to legal reasons, this really helps a lot.

                  I additionally included some of the tweaks provided here in the forum into the [tt]txnewsletters.inc.php[/tt]. Especially Nacnud’s solution for using TXNewsletters with a MODx installation placed in a subdirectory (see http://modxcms.com/forums/index.php/topic,24195.msg247058.html#msg247058) was a great idea.

                  The only thing is: I cannot get the TXNewsletters confirmation funcionality to work in my test installation. After clicking the link within the confirmation e-mail (which looks this way: [tt]http://[name-of-my-server]/[name-of-MODx-directory]/index.php?id=49?&action=confirm&control=e8b40f839f0ee20d00f51033178ceec3&TXNewsletters_form_send=ok&formmenuaction=add_send&Name=van+Laar&Firstname=Michael&Zipcode=&City=&Country=&Language=German&Phone=&Email=michael%40van-laar.de&Example1=option1&Example2%5B0%5D=option2&Example3=option1&Subscribe%5B0%5D=TXNewsletter1[/tt] ) the browser displays the following error message:

                  « MODx Parse Error »
                  MODx encountered the following error while attempting to parse the requested resource:
                  « PHP Parse Error »

                  PHP error debug
                  Error: urlencode() expects parameter 1 to be string, array given
                  Error type/ Nr.: Warning - 2
                  File: /www/htdocs/w00bec78/MvL-Test/assets/snippets/weblogin/weblogin.common.inc.php
                  Line: 79
                  Line 79 source: $urlstring[] = urlencode($name) . ’=’ . urlencode($value);

                  Parser timing
                  MySQL: 0.0012 s (2 Requests)
                  PHP: 0.0499 s
                  Total: 0.0511 s

                  It seems that there are some problems with the weblogin snippet. Since I used the standard MODx demo template with the test installation, there was a login form in the sidebar.

                  After deleting the login form part from the template, the above-mentioned error message was not shown after clicking the confirmatoin link. Instead a 404 error page was displayed by MODx. The page with the subscription form (id 49), which is also the target of the confirmation link, contains only the snippet call [tt][!TXNewsletters? &action=add!][/tt].

                  Any ideas why this is not working and how to fix it?
                    • 26931
                    • 2,314 Posts
                    Hi MichaelvanLaar,

                    [!TXNewsletters? &action=add!]

                    maybe
                    [!TXNewsletters? &action=`add`!]


                    *edit: no, sorry...it’s like that in my call too
                      • 4041
                      • 788 Posts
                      I’m not sure how this snippet sets the links, but it looks like the ? after id=49 of the generated link is creating the error:

                      index.php?id=49?&action=confirm
                        xforum
                        http://frsbuilders.net (under construction) forum for evolution