We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
Subscribe: RSS
  • Responses crossed. That's sorted it completely. Brilliant detective work - many thanks again!
    • 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.
      • 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.

        • i'm having trouble adding the sender. Although

          $modx->mail->address('sender', 'info@voedingscentrum.nl');

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

            $modx->mail->address('from', 'from@domain.tld', 'Graphical sender');

              Developer at Adwise Internetmarketing, the Netherlands.
            • 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

              • 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 info@mymail.com but the from can be the person working for "mymail.com", "John Doe <j.doe@mymail.com>".

                  Developer at Adwise Internetmarketing, the Netherlands.
                • got it

                  • 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
                    • 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