Forums

How to make notifications by email

tempus 02 Jan, 2018
Hi GH, Max and community

I am making a form with the statistics by users on the load event and personalized emails for each user on the submit event.

Using custom query on load I made the table with info by each user (name, email, other users needed info).

Please help to make personalized emails to each of them and send.

P.S. I have tried to make such emails with this solution https://www.chronoengine.com/forums/posts/t100074/php-mail-option-custom-code
or Event Switcher but nothing does not work.
Max_admin 04 Jan, 2018
Hi tempus,

If you have the data then you can use PHP to print any info in the email body:
<?php echo $form->data["field_name"]; ?>


It's more convenient to use v6 though since this is a new form and both versions can be installed on the same website!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
tempus 12 Jan, 2018
Thank you, Max!

One more question left. How to make many personalized e-mails to the users, who are in my statistics table?

I have an example from the forum, but my hosting provider have restricted php mail() function.
Is it possible by the custom code to call the specified e-mail event in my form?


Example:
$results = array();
foreach ( $form->data['coles'] as $v ) {
$to = $v[co_m_director];
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: noreply@programasi.org" . "\r\n";
mail($to,$subject,$txt,$headers);
}
GreyHead 15 Jan, 2018
Hi tempus,

You can do this with Custom Code but note that it will still use whatever PHP mailer library is enabled on your site so may still be restricted.

Bob
This topic is locked and no more replies can be posted.