You could probably achieve this by writing a function for the eFormOnBeforeMailSent or the eFormOnParse event. This function would have to compile the attachement, probably save it to a file and create and send the email using phpmailer. Here’s some starters:
loading a template chunk and merging the form values (ie creating the body of the email / attachment):
<?php
$mail_template = efLoadTemplate('someChunk');
$body = formMerge($mail_template,$fields);
?>
The code for sending email could be something like this:
<?php
include_once "manager/includes/controls/class.phpmailer.php";
$mail = new PHPMailer();
$mail->IsMail();
$mail->CharSet = $modx->config['modx_charset'];
$mail->IsHTML($isHtml);
$mail->From = '[email protected]';
$mail->FromName = 'Some Name';
$mail->Subject = $fields['subject'];
$mail->Body = $mail_body;
AddAddressToMailer($mail,"to",$fields['email']);
AttachFilesToMailer($mail,$attachment); //$attachment would point to the file you created
if(!$mail->send()) $fields['validationmessage'] = 'Unable to send mail at this time. Please try again later';
?>
You would use this inside an event function. Read the eform documentation and samples in the eform/docs/ folder and browse the
wiki to learn more about using eform events.
Good luck