JUtility::sendMail and JFactory::getMailer

737 views
Skip to first unread message

jack-shepherd.com

unread,
Jul 26, 2010, 1:21:14 PM7/26/10
to Joomla! General Development
This may be a very straightforward question. As an amateur developer,
I am wondering what the difference between these two ways of sending
emails is. The reason I ask is that I have developed a number of
components using JUtility::sendMail and it works fine, whether the
Email configuration is set to sendMail or PHP Mailer function. But in
com_massmail, it uses JFactory::getMailer, and this fails to work. It
gives me the "Could not instantiate mail function" error message. Can
anybody think why one of these methods works and the other does not? I
have tried it with SMTP and I cannot get either to work with this
setting, even though I'm pretty sure I have all my settings correct...

Phil Snell

unread,
Jul 26, 2010, 7:45:01 PM7/26/10
to joomla-de...@googlegroups.com
afaik, the JFactory one is the preferred way. Don't know why it would
give you these problems.

Niels Braczek

unread,
Jul 26, 2010, 9:43:12 PM7/26/10
to joomla-de...@googlegroups.com
jack-shepherd.com schrieb:

> com_massmail, it uses JFactory::getMailer, and this fails to work. It
> gives me the "Could not instantiate mail function" error message. Can
> anybody think why one of these methods works and the other does not? I
> have tried it with SMTP and I cannot get either to work with this
> setting, even though I'm pretty sure I have all my settings correct...

Had the same problem recently - Joomla does not set the From field (see
description for mail() in the PHP manual for further information)
automatically. It only sets the ReplyTo address. On some servers, the
underlying MTA refuses to transport the mail, because the sender is not
identified correctly. Just setting the From-value manually to the site's
email address solved the issue for me.

HTH
Niels

--
| http://www.kolleg.de · Das Portal der Kollegs in Deutschland |
| http://www.bsds.de · BSDS Braczek Software- und DatenSysteme |
| Webdesign · Webhosting · e-Commerce · Joomla! Content Management |
------------------------------------------------------------------

jack-shepherd.com

unread,
Jul 27, 2010, 3:24:12 PM7/27/10
to Joomla! General Development
Thanks for your help. I'll give this a go.

jack-shepherd.com

unread,
Jul 28, 2010, 2:30:50 PM7/28/10
to Joomla! General Development
I couldn't get this working, is there any chance you could tell me
where I edit the settings?

On Jul 27, 2:43 am, Niels Braczek <nbrac...@bsds.de> wrote:

jack-shepherd.com

unread,
Jul 28, 2010, 4:58:14 PM7/28/10
to Joomla! General Development
In case anybody is looking for answers on this, I have tried
everything but come to the conclusion that my server has put some kind
of limit on the number of emails you can send at a given time. I am
trying to send over 1000 emails since I have this many users, but my
limit seems to cap at 53 (I am using Dreamhost). On my local server, I
can send an unlimited number. So I'm going to have to develop some
kind of queuing system, which is quite annoying...

On Jul 28, 7:30 pm, "jack-shepherd.com" <jackwsheph...@gmail.com>
wrote:

Andrea Tarr at Tarr Consulting

unread,
Jul 28, 2010, 6:10:33 PM7/28/10
to joomla-de...@googlegroups.com
That is actually a fairly normal set up for shared hosting. It's one of the
reason (along with the need to de-blacklist all the time) that people are
moving to 3rd parties for sending mass emails to customers.

Andy

Andrea Tarr
Tarr Consulting

www.tarrconsulting.com

--
You received this message because you are subscribed to the Google Groups
"Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to
joomla-dev-gene...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/joomla-dev-general?hl=en-GB.


klas....@gmail.com

unread,
Jul 28, 2010, 7:15:34 PM7/28/10
to joomla-de...@googlegroups.com
Or use newsletter component like Joobi that already has queue functionality.

klas

Dne 29. jul. 2010 00:10 je Andrea Tarr at Tarr Consulting <at...@tarrconsulting.com> napisal:
Reply all
Reply to author
Forward
0 new messages