Chronoforms successfully sends emails - great!
The problem I'm experiencing is that it doesn't seem to use the Joomla configured mailer method and instead manually sends its mails through the PHP mail() function.
Is this expected behavior? How can I change this to use the Joomla configured mailer method? The need is that all site emails are sent through Mandrill and I cannot track Chronoforms-generated emails the way they are currently generated and sent.
The problem I'm experiencing is that it doesn't seem to use the Joomla configured mailer method and instead manually sends its mails through the PHP mail() function.
Is this expected behavior? How can I change this to use the Joomla configured mailer method? The need is that all site emails are sent through Mandrill and I cannot track Chronoforms-generated emails the way they are currently generated and sent.
Hi korireed,
CFv4 uses the Joomla! mailer, in CFv5 Max switched to make CF largely independent of the Joomla! framework so it has it's own mailer. I don't know anything about Madrill but a quick check of the docs suggest that you could probably use their API (or the Joomla! mailer) to send form emails from a Custom Code action.
Bob
CFv4 uses the Joomla! mailer, in CFv5 Max switched to make CF largely independent of the Joomla! framework so it has it's own mailer. I don't know anything about Madrill but a quick check of the docs suggest that you could probably use their API (or the Joomla! mailer) to send form emails from a Custom Code action.
Bob
GreyHead,
Thanks so much for your quick reply! Glad to know it's as I suspected and I wasn't doing something wrong.
In order to use the Joomla mailer I would use a custom code action... would I be writing the PHP to generate and send the email as detailed in the J! documentation here? http://docs.joomla.org/Sending_email_from_extensions
Warmest regards,
Cory
Thanks so much for your quick reply! Glad to know it's as I suspected and I wasn't doing something wrong.
In order to use the Joomla mailer I would use a custom code action... would I be writing the PHP to generate and send the email as detailed in the J! documentation here? http://docs.joomla.org/Sending_email_from_extensions
Warmest regards,
Cory
Hi korireed,
Yes that's the code, the form data is in the $form->data array so you'd use, e.g.
The code from the Cfv4 email action or my Email [GH] action might help here if you are familiar with PHP. Though. looking at my code, a lot of that deals with other Joomla! versions and options that you may not need. Here's the core chunk of the Joomla! 3 code
Bob
Yes that's the code, the form data is in the $form->data array so you'd use, e.g.
$mailer->addRecipient($-form->data['recipient']);to set the To Email, and so on.
The code from the Cfv4 email action or my Email [GH] action might help here if you are familiar with PHP. Though. looking at my code, a lot of that deals with other Joomla! versions and options that you may not need. Here's the core chunk of the Joomla! 3 code
} elseif ( $jversion->RELEASE > 2 ) {
$mail =& JFactory::getMailer();
$mail->setSender(array( $from_email, $from_name ));
$mail->addRecipient($recipients);
$mail->setSubject($subject);
$mail->setBody($email_body);
$mail->isHTML((bool) $sendas == 'html' );
$mail->Encoding = 'base64';
$mail->addAttachment($email_attachments);
$mail->addCC($cc_emails);
$mail->addBCC($bcc_emails);
$mail->addReplyTo(array($replyto_email, $replyto_name));
$email_sent = $mail->Send();
}As you see the variables have all been processed before from the $form->data array and the action options before this
Bob
This topic is locked and no more replies can be posted.
