We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14162
    • 67 Posts
    Responses crossed. That's sorted it completely. Brilliant detective work - many thanks again!
      • 39300
      • 1 Posts
      Hello. I found a mistake in modswiftmailer.class.php @ line 1018. There is a variable $send, which is undefined. I think this is a typo. Must be $sent.
      Version 0.3.1-pl, installed with package manager.
        • 36173
        • 26 Posts
        I am having similar issues show up randomly in my output: i.e. string(39) "Recipient "

        When I visit the Extras page it says don't use this version. Can anyone point me to the current version and let me know if this fix is in the mix.

        Also, not documented how I add raw headers...what is the function call for that?

        Big thanks and love the product.

        G
          • 24629
          • 370 Posts
          i'm having trouble adding the sender. Although

          $modx->mail->address('sender', '[email protected]');


          is in there the mail says 'No Sender'. any ideas?
          Rdg
            • 24865
            • 289 Posts
            You need to use that in conjunction with:

            $modx->mail->address('from', '[email protected]', 'Graphical sender');
              @MarkGHErnst

              Developer at Adwise Internetmarketing, the Netherlands.
              • 24629
              • 370 Posts
              Aha ok tnx,

              do i also need to add the returnPath here? Modx gives me an error on that
              [2012-08-22 12:50:24] (ERROR @ /index.php) modSwiftMailer is missing a Return-Path


              Rdg
                • 24865
                • 289 Posts
                Yep, that has to do with the 'from' part. See, the sender is a hidden header inside e-mails, where as the from is really the graphical sender, i.o.w. the sender you'll see in your e-mail as the "from". In essence, the sender can be [email protected] but the from can be the person working for "mymail.com", "John Doe <[email protected]>".
                  @MarkGHErnst

                  Developer at Adwise Internetmarketing, the Netherlands.
                  • 24629
                  • 370 Posts
                  got it
                  tnx

                    • 24629
                    • 370 Posts
                    Hi,
                    how can i set the content type to text/plain?
                    I tried $swiftmail->body($body,'text/plain);
                    and $swiftmail->setPlain();
                    but neither seem to work
                    Rdg
                      • 40944
                      • 78 Posts
                      Hi,

                      I thought this would be really easy to find, but I am having trouble finding stuff and understanding what is what.

                      I want to send an e-mail to all contestants for a contest after a manager clicks a button. My code cycles through all the contestants and checks if a time has been filed in. If this is the case, a personalized will be sent to the contestant. The e-mail template looks like this:
                      "Hi [name contestant],
                      [...]
                      You should be present at [starting time]

                      kind regards [..]"

                      This all works perfectly until there are more than 20 contestants. Since this is usually the case, this won't work.

                      If I understand correctly a plugin like Throttler should solve this, but I tested it using the code in this topic and couldn't get it to work.

                      The code I used:
                      $this->modx->mail->plugin('throttler', array(
                      	'active' => false,
                      	'rate' => 20,
                      	'mode' => 'messages' // toggle 'bytes' for Bytes ;) Do yehr own calculation
                      ));


                      I didn't get the 'mode' part with the comment about calculating size in bytes (?). But I thought this wasn't really relevant because it's the amount of consecutive e-mails.

                      Am I completely wrong? I could also just send all contestants one generic e-mail saying their starting time has been updated with a link to the contest page, but that feels weak.

                      Thanks in advance smiley