I am not sure if this is a server issue as seemed to be working on my testing server but now live on the clients server this issue is arising. The email is generated from a form which includes a file upload in either word or pdf which is saved to the server and then attached to the email.
The problem is that the files are coming through in the email without any file extension by the looks of things so .doc files open as .txt files and .pdf files open as gobbledigook.
Can anyone shed any light on this (the server is on PHP 5.2.9 if this does have any impact). Not sure if code is needed but the attachment part is:
// From applications class to rename file upload
this->ext = pathinfo($file['name'], PATHINFO_EXTENSION);
$this->filename = $name.'-'.date('dmY-Hi').'-cv.'.$this->ext;
// $_POST['cv_file'] is re-populated with the new filename in the form submission page before email is sent (this is because I use the array of posted values to insert into the database rather than having to type them out over and over)
$mail->AddAttachment('files/cvs/'.$_POST['cv_file'], "CV File");