I've set up a regular form with 5 attachments. It's all working fine as expected. Now, I don't want to send the uploaded files as attachments since they can be quite big. So, i've put in the following code before submit
When I put this code, the mail comes in as expected, it has the list of files, and no attachments, exactly as expected. But only, in this case, the mail is delivered to my spam folder. Instead of the above, if i put in just
The mail comes to my inbox
<h2>Thank You for the support request</h2>
<p>We will get in touch with you soon</p>
<?php
$i = 1;
$op = 'Following files were uploaded <br /><br />';
foreach($attachments as $attachment) {
$link = JURI::root() . 'components/com_chronocontact/upload/' . basename($attachment);
$op .= 'File #'.$i.' <a href="'.$link.'">'.basename($attachment).'</a><br/>';
}
$html_message = str_replace('{files_list}', $op, $html_message);
$attachments = null;
?>
When I put this code, the mail comes in as expected, it has the list of files, and no attachments, exactly as expected. But only, in this case, the mail is delivered to my spam folder. Instead of the above, if i put in just
<?php
$attachments = null;
?>
The mail comes to my inbox