D-Mack Media Forums

Full Version: Receive SMTP - PHPMAILER_RECIPIENTS_FAILED - Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I received the following email July 5, 2008 and thought I'd add it to the Forum:
--------------------------------------------
Hello! What a great extension you have created with D-Mack Media
RecommendFriends!

I found several bugs after some testing:

  1. The email won't work if /when the Joomla 1.5.3 Global
    Configuration's Mailer is set to SMTP server. This effectively
    renders the whole extension futile for those who use SMTP servers
    because recommendations cannot be sent out via email. It will report with the error message "PHPMAILER_RECIPIENTS_FAILED". Even though setting the Mailer to PHP Mail Function will get rid of the error message, there are no emails sent out.
  2. Capcha code does not refresh when the refresh button beside it was clicked.
  3. Capcha will insist that the wrong code has been entered if the
    user tries to reuse the same page again by hitting the back
    button. Solution: either automatically refresh the Capcha code when
    the back button of the browser is used, or allow the same Capcha code to be reused on the same page.
I look forward to further improvements. Thanks and keep it up.

Kind Regards,
========
K-W
========
Hi K-W,

After some digging I found a few posts on forum.joomla.org (Joomla! Forums) that might help with a couple of issues.

----- Problem #1 ------
Many other people have experienced problems with SMTP errors (not with the RecommendFriends Component - just Joomla! in general).

My first, and most important question: Can you send - and receive - emails sent through a standard/default Joomla! Contact form??

If not, then most likely the problem does not lie with the RecommendFriends component. If you can, then I will have some digging to do. Please let me know...

Joomla Forum threads (both were solved):
http://forum.joomla.org/viewtopic.php?f=...p#p1334730
http://forum.joomla.org/viewtopic.php?f=...p#p1334657

And a muck longer thread which only applies to an SMTP fix for secure (SSL) servers - if that's your case:
http://forum.joomla.org/viewtopic.php?f=304&t=268623

----- Problem #2 ------
When you click the Refresh button beside the Captcha image - do you get a Javascript Pop-up box stating that 'Clicking OK will erase all info on the form! Continue Anyway'? Please let me know...

----- Problem #3 ------
This is an issue I am aware of and am trying to get an answer for. The problem is that clicking the back button on your browser is not the same as a page 'refresh', which is what is needed to reset the captcha image and hidded security code. I may include a 'Back' button that will reload the component (not just a history(-1) Javascript code). I'll keep you posted...

Thanks for the Feedback!!
Hi Don,

Thank you for your email reply and for asking me to post my original message onto the DMMForum so that everyone can benefit from our dialogue. Here it is:

... see first post in this thread

Kind Regards,
=========
SoundEagle
=========


Admin NOTE:
I apologize SoundEagle, I edited/trimmed down your post (and merged it with this thread) because it was basically the same as the first post in this thread. Please read my reply above. I also changed the Subject line so it might be more useful for anyone performing a search...

Thanks for understanding!
Hi Don,

I have again tested the com_recommendfriends_TEST_for_v2.0.1.zip that you sent me.

----- Problem #1 ------
This has been fixed, thankfully!

----- Problem #2 ------
When I click the Refresh button beside the Captcha image - I do get a Javascript Pop-up box stating that 'Clicking OK will erase all info on the form! Continue Anyway?'. The page does get refreshed. However, the info is retained and not erased, and the same Captcha image is loaded. I would suggest that it is better to generate a new code, for the reasons mentioned below.

----- Problem #3 ------
I agree with you that clicking the back button on your browser is not the same as a page 'refresh', which is what is needed to reset the captcha image and hidded security code. However, many users might just go back to the previous page and try to send more recommendations there. And they will get very annoyed and/or confused that they keep getting the message "*** You have entered an invalid Security Code... Please try again ***" when they have repeatedly entered the code correctly. And it may not occur to them to do an actual page 'refresh' or press the F5 function key.

As I mentioned before, the solution could be as follows: either automatically refresh the Capcha code when the back button of the browser is used (this may mot be achieveable), or allow the same Capcha code to be reused on the same page (because there is no reason why this should not be allowed, unless you have compelling reason(s) to allow each Capcha code to be used only once).

Another solution is to implement an AJAX-driven button to allow the user to change the Capcha code. After all, this feature would be required if for any reason, the user cannot decipher the Capcha code and would like a different one. This also has the advantage that the whole webpage does not need to be reloaded or refreshed.

For the same reason, the Formatting Preview at the back end can also be AJAX-driven.


Bravo for your response and fix! I look forward to future releases.
Hi Don,

By the way, if you don't mind me asking and/or if it is not too difficult or troublesome for you to explain, where have you found the problems in the recommendfriends component that prevented emails from being sent? And what are the problems exactly?

Kind regards,
KHAI-WEI (or SoundEagle)
Hi KHAI-WEI (or SoundEagle),

So glad the send email routine works for SMTP now!!Big Grin

The issue was with some of my code I had for the Joomla! Jmailer setup. I was, mistakenly, trying to add recipients email addresses and names as an array to pass to the Jmailer function setRecipient. I discovered in the Jmailer class that it only allows the 'setSender' to be setup that way in an array.

I removed the array - it now just sets the recipient email address (no name) and, as per your confirmation, it looks like it works and we're good to go!

Thank for your other suggestions as well. By no means am I an expert on AJAX, in fact I am a complete noob, but would definitely like to get more familiar with it so i could implement your ideas.

Thanks again!
Hi Don and Dog (as shown in the photo with the Earth as a backdrop),

I am delighted that there is no major drama and that the problem was identified by me and then overcome by you very quickly. At this rate of progress, the extension will definitely be getting better and better by the day, with or without AJAX!!

Are you working on other extensions? And do you intend to add new features to this extension?

Cheers!
Hi SoundEagle,

The dog in my Avatar is my doggie Bandit - he's a very friendly Border Collie who loves to play fetch and can catch frisbees on the fly.

As for future development, as I mentioned, I would like to get more familiar with AJAX and try to incorporate that into the RecommendFriends component.

For new extensions, I am considering developing a slimmed down version of the RecommendFriends component and making it into a module.

I am also considering developing a small 'Contact Us' component that will use a lot of the code from the RecommendFriends component.

Thanks again for your patience and help!
Hi Don,

Thanks a lot for your reply.

I'll have to retire very soon as it is almost three in the morning!!

ZZZZzzzZZZZzzzZZZZzzzZZZZzzzZZZZzzzZZZZzzzZZZZzzz

PS: I'll picture in my head the number of times and the manner in which Bandit jumps over the fence (in lieu of the sheep), as my last conscious thoughts fade away.
Reference URL's