Forums

Chronoforms - v4 - not sending via smtp

rakatatech 17 Feb, 2016
Hi,

Weird problem this.

Joomla is setup to use smtp - Chronoforms would be appearring to use phpMail (we can tell from the received headers in the email which route its taking).

Checked the forms - can't see anything.

Running a test form Messaging in joomla - email goes via smtp. But its still going via phpMail on Chronoforms - we've not over-ridden anything as far as I'm aware or can tell.

Due to restrictions by the host on email sent via sendmail we really need the email sent via smtp.

Any advice appreciated, Scott
GreyHead 17 Feb, 2016
Hi rakatatech,

AFAIK ChronoForms v4 uses the Joomla! mail settings - there isn't anywhere else to add different settings. What have you got set up in the site configuration?

Bob
rakatatech 17 Feb, 2016
yep - figure that was the answer - so confused :?

From the config:

    public $mailer = 'smtp';
	public $sendmail = '/usr/sbin/sendmail';
	public $smtpauth = '0';
	public $smtphost = 'X.X.X.X';
	public $smtppass = '';
	public $smtpport = '25';
	public $smtpsecure = 'none';
	public $smtpuser = '';


(ip address removed)
I know sendmail is set - but we have it set almost always and emails go via smtp - if the mailer is smtp.
GreyHead 18 Feb, 2016
Hi Scott,

I'm not sure what that tells me about your forms?

Bob
rakatatech 18 Feb, 2016
Hi,

You'd asked about site configuration.

The forms are using the standard email event to send an email. Haven't overridden anything that I can specifically think of.

What would you be looking at ?

thanks, Scott
GreyHead 18 Feb, 2016
Hi Scott,

Sorry, I meant the settings in Site Admin > Global Configuration > Server > Mail Settings. They will be the same with the addition of the Mailfrom and fromname.

So that is the service that ChronoForms will use.

Bob
rakatatech 18 Feb, 2016
Yes - so mail settings are set to be:

SMTP
No authentication
port 25
Host is an internal smtp server IP address.

I've been looking at the code though - the chronoform email seems to use:


$JMail = new JMail();
$email_sent = $JMail->sendMail( ... 


To send the email - no mention of whether to use smtp etc.

The joomla docs recommend using:


$mailer = JFactory::getMailer();


To get the JMail object. I'm wondering if this makes sure that the JMail object picks up the default configuration ?

I'm not a Joomla coder so could well be missing something here.

Any thoughts welcome, Scott
GreyHead 18 Feb, 2016
Answer
Hi Scott,

In the current 4.0.6 version I have installed the code is
		$JMail = JFactory::getMailer();
around line 216 of /administrator/components/com_chronoforms/form_actions/email/email.php

Bob
rakatatech 18 Feb, 2016
Interesting ! - thats not what I've got. OK thanks - that is probably the culprit - I'll test later. Scott
rakatatech 18 Feb, 2016
Thanks for the input and pointers - yes, we were running a slight older version 4 that just used Jmail rather than JFactory to get the Joomla mailer - that accounted for the difference.

thanks again, Scott
This topic is locked and no more replies can be posted.