I’m trying to create a form (using eForm) which will allow a user to upload a text document (txt, doc, pdf) and have it sent as an e-mail attachment.
When I submit the form, I just get and e-mail saying:
’Attachement: attachmentname.txt’
No attachment there at all. Any idea what I might be missing?
I’m on IIS, and I’ve seen somebody mention that the PHPMailer class needs to be up to date. I’m not sure where this needs to be updated (server? modx itself?) but maybe the fact that I’m not on Apache is causing the issue?
Code is as follows:
Template
<p class="error">[+validationmessage+]</p>
<form method="post" action="[~[*id*]~]" id="EmailForm" name="EmailForm" enctype="multipart/form-data">
<p><input name="formid" type="hidden" value="ContactForm" /></p>
<p><label for="cfName">Ihr Name:<br>
<input name="name" id="cfName" class="text" type="text" eform="Your Name::1:" /></label></p>
<p><label for="cfEmail">Ihre Email-Adresse:<br>
<input name="email" id="cfEmail" class="text" type="text" eform="Email Address:email:1" /> </label></p>
<p><label for="cfRegarding">Betreff:<br>
<input name="subject" id="cfRegarding" class="text" type="text" eform="Form Subject::1" /> </label></p>
<p><label for="cfMessage">Ihre Mitteilung:<br>
<textarea name="message" id="cfMessage" eform="Message:textarea:1" cols="50" rows="10"></textarea></p>
</label>
<p><label for="attachment">Attachment</label>
<input class="field" type="file" name="attachment" eform="Attachment:file:0:Only upload of text documents are supported:#LIST pdf,txt,doc " /></p>
<p><label> </label><input type="submit" name="contact" id="cfContact" class="button" value="Absenden" /></p>
Report is:
<p>Attachment:<br />[+attachment+]</p>
Snippet call is:
[!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`1` !]
Anybody think they can shed some light on what my problem may be?
Thanks