Hi!
I'm trying to get my form to send out the "thank you"-page to the two emails collected in the form, one of them should be sent as a ccemail. I've searched the forums and tried different solutions but nothing works. My "On Submit code - after sending email" code looks like this (the short version) :
$recipient gets the email but $ccemails does NOT. How can I make this work???
I'm using Joomla 1.0.15 and ChronoForms 2.3.9
I'm trying to get my form to send out the "thank you"-page to the two emails collected in the form, one of them should be sent as a ccemail. I've searched the forums and tried different solutions but nothing works. My "On Submit code - after sending email" code looks like this (the short version) :
<?php
$recipient = $_POST['email'];
$ccemails = $_POST['email2'];
$subject = "My subject";
$html_message = "<h1>My html message</h1>
<p>Thank you <strong>".$_POST['fname']."</strong>, for filling out my form.</p>
<table>
<tr><td>First name: </td><td>".$_POST['fname']."</td></tr>
<tr><td>1st email: </td><td>".$_POST['email']."</td></tr>
<tr><td>2nd email: </td><td>".$_POST['email2']."</td></tr>
</table>";
mosMail($from, $fromname, $recipient, $subject, $html_message, true, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
echo $html_message; ?>
$recipient gets the email but $ccemails does NOT. How can I make this work???
I'm using Joomla 1.0.15 and ChronoForms 2.3.9
try to check your server logs or change the mailer method at the global config, you can ask your host for advice about this as the code looks ok and should work!
Cheers
Max
Cheers
Max
Haha, when i set the second email as an blind carbon copy
Thank you for your help anyways!
EDIT: In Joomlas global settings I changed mailer from "PHP mail function" to "Sendmail" and everything works as it should, even the ccmails🙂
$bccemails = $_POST['email2'];
its sends the mail to that one also! Wierd I think, why wouldn't it send it as ccemail? not the optimal solution but atleast email2 gets a mail, that has to do for now...Thank you for your help anyways!
EDIT: In Joomlas global settings I changed mailer from "PHP mail function" to "Sendmail" and everything works as it should, even the ccmails🙂
Thanks for posting the final solution!
Cheers
Max
Cheers
Max
This topic is locked and no more replies can be posted.